OnCloseFileC event/delegate/callback


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

CBFSFilter     See also    


This callback is called right before the file or directory is closed.


    property OnCloseFileC : TCBFSFltCloseFileEventC;
    TCBFSFltCloseFileEventC = procedure(Sender : TObject; FileName: TCBString; var FileContext: pointer; HandleContext) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CBFSFltCloseFileEventC)(CBFSFilter* Sender, LPCWSTR FileName, PVOID *FileContext, PVOID HandleContext);

[C++ (VCL)]
    typedef void __fastcall (__closure *TCBFSFltCloseFileEventC)(System::TObject* Sender, TCBString FileName, void* &FileContext, void* HandleContext);

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

    delegate void CBFSFltCloseFileEventC(CBFSFilter Sender, string FileName, ref IntPtr FileContext, IntPtr HandleContext);

    Delegate Sub CBFSFltCloseFileEventC(ByVal Sender As CBFSFilter, ByVal FileName As String, ByRef FileContext As IntPtr, ByVal HandleContext As IntPtr)


  • Sender - reference to the class that called the delegate/event handler
  • FileName - contains the name of the file which is being closed
  • FileContext - the placeholder for the application-defined data, common to all concurrent file operations on the file
  • HandleContext - the placeholder for the application-defined data, local to each opened file handle


This callback is called right before the file or directory with the given name is closed.

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

OnCleanupFileC     OnCloseFileN     OnCreateFileC     OnOpenFileC