OnPreSetInformationKey event/delegate/callback


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

CBFSRegistry     See also    


This callback is called before the request to set key metadata is processed by the system code which deals with the registry.


    property OnPreSetInformationKey : TCbRegPreSetInformationKeyEvent;
    TCbRegPreSetInformationKeyEvent = procedure( Sender : TObject; UserContext: pointer; KeySetInformationClass: KEY_SET_INFORMATION_CLASS; ValueData: TCbRegInformation; var Processed: boolean; var CallPostCallback: boolean; var StopFiltering : boolean ) of object;

[C++ (Lib)]
    typedef void (*CbRegPreSetInformationKeyEvent)( CBFSRegistry* Sender, LPVOID UserContext, KEY_SET_INFORMATION_CLASS KeySetInformationClass, CbRegInformation *ValueData, BOOL * Processed, BOOL * CallPostCallback, BOOL * StopFiltering );

[C++ (VCL)]
    typedef void __fastcall (__closure *TCbRegPreSetInformationKeyEvent)( System::TObject* Sender, void *UserContext, Cbregapi::_KEY_SET_INFORMATION_CLASS KeySetInformationClass, TCbRegInformation *ValueData, bool &Processed, bool &CallPostCallback, bool &StopFiltering );

[C++ (.NET)]
    public delegate void CbRegPreSetInformationKeyEvent( CBFSRegistry^ Sender, Object^ UserContext, CbReg::KEY_SET_INFORMATION_CLASS KeySetInformationClass, CbRegInformation ^ValueData, bool %Processed, bool %CallPostCallback, bool %StopFiltering );

    delegate void CbRegPreSetInformationKeyEvent( CBFSRegistry Sender, Object UserContext, CbReg.KEY_SET_INFORMATION_CLASS KeySetInformationClass, CbRegInformation ValueData, ref bool Processed, ref bool CallPostCallback, ref bool StopFiltering );

    Delegate Sub CbRegPreSetInformationKeyEvent( ByVal Sender As CBFSRegistry, ByVal UserContext As Object, ByVal KeySetInformationClass As CbReg.KEY_SET_INFORMATION_CLASS, ByVal ValueData As CbRegInformation, ByRef Processed As Boolean, ByRef CallPostCallback 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
  • KeySetInformationClass - indicates the type of information to be returned by the system in the ValueData object
  • ValueData - the object of type CbRegKeySetInformation that contains information being returned to the system
  • Processed - if it's set to TRUE then the request doesn't go further (to the registry manager). Default value is FALSE.
  • CallPostCallback - if it's set then the post-processing callback will be called. By default it's TRUE. This parameter doesn't matter when StopFiltering or Processed is set or non-successful result is returned.
  • StopFiltering - if StopFiltering is set to true, no other callbacks for the created key handle will be called

Values of KeySetInformationClass


This callback/event is called before a request to set key metadata 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 OnPreOpenKey/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 CBFSRegistry.

See also

OnPostSetInformationKey     OnPreCreateKey     OnPreOpenKey