OnPostQueryMultipleValueKey event/delegate/callback


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

CBFSRegistry     See also    


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


    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)( CBFSRegistry* 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( CBFSRegistry^ Sender, Object^ UserContext, UInt32 Result, UInt32 EntryCount, bool RequestRequiredLength, array<String^>^ ValueNames, CbRegInformation^ ValueData, bool %StopFiltering );

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

    Delegate Sub CbRegPostQueryMultipleValueKeyEvent( ByVal Sender As CBFSRegistry, 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 )


  • 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, ECBFSRegistryError 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


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 CBFSRegistry.

See also

OnPreCreateKey     OnPreOpenKey     OnPreQueryMultipleKey