OnCloseDirectoryEnumeration event/delegate/callback


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

CBFSConnect     See also    


The event is fired when the OS has finished enumerating contents of the directory.


    property OnCloseDirectoryEnumeration : TCBCloseDirectoryEnumerationEvent;
    TCBCloseDirectoryEnumerationEvent = procedure( Sender : TObject; DirectoryInfo: TCBFileInfo; EnumerationInfo: TCBDirectoryEnumerationInfo ) of object;

[C++ (Lib)]
    void (__stdcall *CBCloseDirectoryEnumerationEvent)(void* Sender, CBFileInfo* DirectoryInfo, CBDirectoryEnumerationInfo* EnumerationInfo );

[C++ (VCL)]
    typedef void (__closure *TCBCloseDirectoryEnumerationEvent)( System::TObject* Sender, CBFileInfo* DirectoryInfo, TCBDirectoryEnumerationInfo* EnumerationInfo );

[C++ (.NET)]
    public __delegate void CBCloseDirectoryEnumerationEvent( CBFSConnect^ Sender, CBFileInfo^ DirectoryInfo, CBDirectoryEnumerationInfo^ EnumerationInfo );

    public void CBCloseDirectoryEnumerationEvent( CBFSConnect Sender, CBFileInfo DirectoryInfo, CBDirectoryEnumerationInfo EnumerationInfo );

    Sub CBCloseDirectoryEnumerationEvent( ByVal Sender As CBFSConnect, ByVal DirectoryInfo As TCBFileInfo, ByVal EnumerationInfo As CBDirectoryEnumerationInfo )

    void ICbFsEnumerateEvents.onCloseDirectoryEnumeration( CBFSConnect sender, CBFileInfo directoryInfo, CBDirectoryEnumerationInfo enumerationInfo );


  • Sender - reference to the class that called the delegate/event handler.
  • DirectoryInfo - information about the directory which is being closed
  • EnumerationInfo - information about current enumeration


This event is fired when the OS has finished enumerating the directory contents and requests the resources, allocated for enumeration, to be released.
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 CBFS Connect. Throwing ECBFSConnectError exception from this event handler will not cause the OS to abort the operation or display an error message to the user.

See also