CallbackRegistry

Control registry operations in Windows and .NET applications

OnPostCreateKey event/delegate/callback

Filter:

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

CallbackRegistry     See also    

Overview

This callback is called after key creation request has been processed by the system code which deals with the registry.

Declaration

[Pascal]
    property OnPostCreateKey : TCbRegPostCreateKeyEvent;
    TCbRegPostCreateKeyEvent = procedure( Sender : TObject; UserContext: pointer; Result: LongWord; var KeyHandle: THandle; var KeyHandleContext: pointer; var GrantedAccess: ACCESS_MASK; var StopFiltering : boolean ) of object;
    type ACCESS_MASK = DWORD;

[C++ (Lib)]
    typedef void (*CbRegPostCreateKeyEvent)( CallbackRegistry* Sender, LPVOID UserContext, DWORD Result, HANDLE *KeyHandle, LPVOID *KeyHandleContext, DWORD *GrantedAccess, BOOL * StopFiltering );

[C++ (VCL)]
    typedef void __fastcall (__closure *TCbRegPostCreateKeyEvent)( System::TObject* Sender, void *UserContext, unsigned Result, unsigned &KeyHandle, void* &KeyHandleContext, unsigned &GrantedAccess, bool &StopFiltering );

[C++ (.NET)]
    public delegate void CbRegPostCreateKeyEvent( CallbackRegistry^ Sender, Object^ UserContext, UInt32 Result, SafeHandle^ %KeyHandle, Object^ %KeyHandleContext, UInt32 %GrantedAccess, bool %StopFiltering );

[C#]
    delegate void CbRegPostCreateKeyEvent( CallbackRegistry Sender, Object UserContext, UInt32 Result, ref SafeHandle KeyHandle, ref Object KeyHandleContext, ref UInt32 GrantedAccess, ref bool StopFiltering );

[VB.NET]
    Delegate Sub CbRegPostCreateKeyEvent( ByVal Sender As CallbackRegistry, ByVal UserContext As Object, ByVal Result As UInt32, ByRef KeyHandle As SafeHandle, ByRef KeyHandleContext As Object, ByRef GrantedAccess As UInt32, ByRef StopFiltering As Boolean )

Parameters

  • Sender - reference to the class that called the delegate/event handler
  • UserContext - the placeholder for the application-defined data
  • Result - win32 error value of the operation. This value is returned to the originator of the request in the case no other result is returned from the callback.
  • KeyHandle - handle of the key which the application may open instead of the system-opened key (see Description for details)
  • KeyHandleContext - the placeholder for the application-defined data which will be passed to OnCloseHandle event
  • GrantedAccess - if the KeyHandle parameter is used the granted access rights must be set here
  • StopFiltering - If StopFiltering is set to true, no other callbacks for the created key handle will be called

Description

This callback/event is called after the application's request to create a key is processed by 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

OnCloseKeyHandle     OnPostCloseKey     OnPostOpenKey     OnPreCreateKey    

Back to top