CallbackRegistry

Control over registry operations in Windows and .NET applications

OnReadFileC event/delegate/callback

Filter:

Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

CallbackRegistry     See also    

Overview

This callback is called when CallbackRegistry needs to delete the virtual file.

Declaration

[Pascal]
    property OnDeleteVirtualFile : TCbFltDeleteVirtualFileEvent;
    TCbFltDeleteVirtualFileEvent = procedure(Sender : TObject; FileName: TCBString; var UserContext: pointer) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CbFltDeleteVirtualFileEvent)(CallbackRegistry* Sender, LPWSTR FileName, PVOID* UserContext);

[C++ (VCL)]
    typedef void __fastcall (__closure *TCbFltDeleteVirtualFileEvent)(System::TObject* Sender, TCBString FileName, void * UserContext);

[C++ (.NET)]
    public delegate void CbFltDeleteVirtualFileEvent(CallbackRegistry^ Sender, String^ FileName, IntPtr% UserContext);

[C#]
    delegate void CbFltDeleteVirtualFileEvent(CallbackRegistry^ Sender, string FileName, ref IntPtr UserContext);

[VB.NET]
    Delegate Sub CbFltDeleteVirtualFileEvent(ByVal Sender As CallbackRegistry, ByVal FileName As String, ByRef UserContext As IntPtr)

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • FileName - contains the name of the file
  • UserContext - the placeholder for the application-defined data

Description

This callback is called when CallbackRegistry needs to delete the virtual file. As the file is virtual and your application manages virtual files, the application must do necessary cleanup in this callback / event handler.
NOTE: this event is not fired for usual (non-virtual) files.

Read more about contexts.

For description of virtual file support, read Virtual Files topic.

Error handling

See Error handling topic for detailed information about how to report errors, which occur in the event handlers, back to CallbackRegistry.

See also

OnCanFileBeDeletedC    

Back to top