CallbackRegistry

Control registry operations in Windows and .NET applications

OnPreCloseKey event/delegate/callback

Filter:

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

CallbackRegistry     See also    

Overview

This callback is called when a thread attempts to close the key.

Declaration

[Pascal]
    property OnPreCloseKey : TCbRegPreCloseKeyEvent;
    TCbRegPreCloseKeyEvent = procedure( Sender : TObject; UserContext: pointer; var StopFiltering : boolean ) of object;

[C++ (Lib)]
    typedef void (*CbRegPreCloseKeyEvent)( CallbackRegistry* Sender, LPVOID UserContext, LPBOOL StopFiltering );

[C++ (VCL)]
    typedef void __fastcall (__closure *TCbRegPreCloseKeyEvent)( System::TObject* Sender, void * UserContext, bool &StopFiltering );

[C++ (.NET)]
    public delegate void CbRegPreCloseKeyEvent( CallbackRegistry^ Sender, Object^ UserContext, bool% StopFiltering );

[C#]
    delegate void CbRegPreCloseKeyEvent( CallbackRegistry Sender, Object UserContext, ref bool StopFiltering );

[VB.NET]
    Delegate Sub CbRegPreCloseKeyEvent( ByVal Sender As CallbackRegistry, ByVal UserContext As Object, ByRef StopFiltering As Boolean )

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • UserContext - the placeholder for the application-defined data
  • StopFiltering - parameter set to true tells the driver to not pass the request to the registry. Parameter set to false allows further processing of the request.

Description

This callback/event handler is called before the application's request to close a key is passed to the registry manager in Windows. The name of the key should be obtained from the user context which must have been set in OnPreCreateKey/OnPreOpenKey callback/event handlers.
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

OnPostCloseKey     OnPreCreateKey     OnPreOpenKey    

Back to top