OnCloseFileC event/delegate/callback

Filter:

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

CBFSFilter     See also    

Overview

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

Declaration

[Pascal]
    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);

[C#]
    delegate void CBFSFltCloseFileEventC(CBFSFilter Sender, string FileName, ref IntPtr FileContext, IntPtr HandleContext);

[VB.NET]
    Delegate Sub CBFSFltCloseFileEventC(ByVal Sender As CBFSFilter, ByVal FileName As String, ByRef FileContext As IntPtr, ByVal HandleContext As IntPtr)

Parameters

  • 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

Description

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