CallbackRegistry

Control over registry operations in Windows and .NET applications

OnCloseEnumeration event/delegate/callback

Filter:

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

CallbackRegistry     See also    

Overview

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

Declaration

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

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

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

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

[C#]
    delegate void CbFltCloseEnumerationEvent(CallbackRegistry Sender, string DirectoryName, IntPtr UserContext);

[VB.NET]
    Delegate Sub CbFltCloseEnumerationEvent(ByVal Sender As CallbackRegistry, 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 CallbackRegistry.

See also

OnEnumerateDirectoryC    

Back to top