CallbackRegistry

Control registry operations in Windows and .NET applications

OnPostQueryMultipleValueKey event/delegate/callback

Filter:

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

CallbackRegistry     See also    

Overview

This callback is called after the request for multiple key values data has been processed by the system code which deals with the registry.

Declaration

[Pascal]
    property OnPostQueryMultipleValueKey : TCbRegPostQueryMultipleValueKeyEvent;
    TCbRegPostQueryMultipleValueKeyEvent = procedure( Sender : TObject; UserContext: pointer; Result: LongWord; EntryCount: LongWord; RequestRequiredLength: boolean; ValueNames: TStringList; ValueData: TCbRegInformation; var StopFiltering : boolean ) of object;

[C++ (Lib)]
    typedef void (*CbRegPostQueryMultipleValueKeyEvent)( CallbackRegistry* Sender, LPVOID UserContext, DWORD Result, DWORD EntryCount, bool RequestRequiredLength, PWCHAR ValueNames[], CbRegInformation *ValueData, BOOL * StopFiltering );

[C++ (VCL)]
    typedef void __fastcall (__closure *TCbRegPostQueryMultipleValueKeyEvent)( System::TObject* Sender, void *UserContext, unsigned Result, unsigned EntryCount, bool RequestRequiredLength, TStringList *ValueNames, TCbRegInformation *ValueData, bool &StopFiltering );

[C++ (.NET)]
    public delegate void CbRegPostQueryMultipleValueKeyEvent( CallbackRegistry^ Sender, Object^ UserContext, UInt32 Result, UInt32 EntryCount, bool RequestRequiredLength, array<String^>^ ValueNames, CbRegInformation^ ValueData, bool %StopFiltering );

[C#]
    delegate void CbRegPostQueryMultipleValueKeyEvent( CallbackRegistry Sender, Object UserContext, UInt32 Result, UInt32 EntryCount, bool RequestRequiredLength, String[] ValueNames, CbRegInformation ValueData, ref bool StopFiltering );

[VB.NET]
    Delegate Sub CbRegPostQueryMultipleValueKeyEvent( ByVal Sender As CallbackRegistry, ByVal UserContext As Object, ByVal Result As UInt32, ByVal EntryCount As UInt32, ByVal RequestRequiredLength As Boolean, ByVal ValueNames As String(), ByVal ValueData As CbRegInformation, 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.
  • EntryCount - the number of values for which data is requested
  • RequestRequiredLength - defines, what value to put to RawDataLength in case when the buffer in ValueData is not enough to hold the data.
    When this happens, ECBRegError exception with ERROR_MORE_DATA error code must be thrown.
    If RequestRequiredLength is true then RawDataLength must contain total data length for all requested values.
    If the parameter is false, then RawDataLength must contain only the size of full data for entries that have been placed to the RawData buffer.
  • ValueNames - the list of the names of the values to query
  • ValueData - the object that contains information being returned to the system.
    CbRegInformation.RawData points to array of CBREG_MULTIPLE_VALUE_ENTRY structures followed by space to hold data for the values.
    RawDataBufferLength is guarantied to be equal or more than EntryCount * sizeof(CBREG_MULTIPLE_VALUE_ENTRY).
    ValueData.ToObject returns an array of CbRegMultipleValueEntry class instances.
    In case RawDataBufferLength has less space than required, an event handler should fill it with only full data for some entries. Don't put partial entry data to ValueBuffer.
  • 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 request for multiple key values data has been 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 CallbackRegistry.

See also

OnPreCreateKey     OnPreOpenKey     OnPreQueryMultipleKey    

Back to top