OnCloseEnumeration event/delegate/callback

Filter:

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

CBFSFilter     See also    

Overview

This notification callback is called when enumeration of files and subdirectories for given directory is done.

Declaration

[Pascal]
    property OnCloseEnumeration : TCBFSFltCloseEnumerationEvent;
    TCBFSFltCloseEnumerationEvent = procedure(Sender : TObject; DirectoryName: TCBString; UserContext: pointer) of object;
    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    typedef void (*CBFSFltCloseEnumerationEvent)(CBFSFilter* Sender, LPCWSTR DirectoryName, PVOID UserContext);

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

[C++ (.NET)]
    public delegate void CBFSFltCloseEnumerationEvent(CBFSFilter^ Sender, String^ DirectoryName, IntPtr UserContext);

[C#]
    delegate void CBFSFltCloseEnumerationEvent(CBFSFilter Sender, string DirectoryName, IntPtr UserContext);

[VB.NET]
    Delegate Sub CBFSFltCloseEnumerationEvent(ByVal Sender As CBFSFilter, ByVal DirectoryName As String, ByVal UserContext As IntPtr)

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • DirectoryName - contains the name of the file which is being closed
  • UserContext - the placeholder for the application-defined data

Description

This notification callback is called after file and directory enumeration was finished. The application can release the context and resources, associated with given search.

The application can use UserContext to store the reference to some information, identifying the file or directory (such as file/directory handle or database record ID or reference to the stream class etc). The value, set in the event handler, is later passed to all operations, related to this file, together with file/directory name and attributes. Read more about contexts.

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

OnEnumerateDirectoryC