Control registry operations in Windows and .NET applications

OnPostDeleteValueKey event/delegate/callback


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

CallbackRegistry     See also    


This callback is called after value deletion request is processed by the system code which deals with the registry.


    property OnPostDeleteValueKey : TCbRegPostDeleteValueKeyEvent;
    TCbRegPostDeleteValueKeyEvent = procedure( Sender : TObject; UserContext: pointer; Result: DWORD; var Processed: boolean; var StopFiltering : boolean ) of object;

[C++ (Lib)]
    typedef void (*CbRegPostDeleteValueKeyEvent)( CallbackRegistry* Sender, LPVOID UserContext, DWORD Result, BOOL * Processed, BOOL * StopFiltering );

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

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

    delegate void CbRegPostDeleteValueKeyEvent( CallbackRegistry Sender, Object UserContext, UInt32 Result, ref bool Processed, ref bool StopFiltering );

    Delegate Sub CbRegPostDeleteValueKeyEvent( ByVal Sender As CallbackRegistry, ByVal UserContext As Object, ByVal Result As Boolean, ByRef Processed As Boolean, ByRef StopFiltering As Boolean )


  • 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 another result isn't returned from the callback.
  • Processed - can be specified that the callback completely processed the request. It matters only if "success" is returned. If this parameter is set then the post-processing callback will not be called. By default it's set to FALSE.
  • StopFiltering - setting it to TRUE stops calling any other callbacks for this key handle. By default it's set to FALSE. Stop filtering can be returned not depending whether error is returned or not.


This callback/event is called after the application's request to delete a value within 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


Back to top