OnReadFileC event/delegate/callback

Filter:

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

CBFSFilter     See also    

Overview

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

Declaration

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

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

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

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

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

[VB.NET]
    Delegate Sub CBFSFltDeleteVirtualFileEvent(ByVal Sender As CBFSFilter, 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 CBFS Filter 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 CBFSFilter.

See also

OnCanFileBeDeletedC