DrtUpdateKey function (drt.h)

The DrtUpdateKey function updates the application data associated with a registered key.

Syntax

HRESULT DrtUpdateKey(
  [in] HDRT_REGISTRATION_CONTEXT hKeyRegistration,
  [in] DRT_DATA                  *pAppData
);

Parameters

[in] hKeyRegistration

The DRT handle returned by the DrtRegisterKey function specifying a registered key within the DRT instance.

[in] pAppData

The new application data to associate with the key.

Return value

This function returns S_OK on success. Other possible values include:

Return code Description
E_INVALIDARG
  • pAppData is NULL
  • The value of cb in pAppData is less than 0.
  • The value of cb in pAppData is more than 5120.
  • The value of pb in pAppData is NULL.
E_HANDLE
hKeyRegistration is an invalid handle.
E_OUTOFMEMORY
The system is out of memory.

Requirements

Requirement Value
Minimum supported client Windows 7 Professional [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header drt.h
Library Drt.lib
DLL Drt.dll

See also

DrtRegisterKey

DrtUnregisterKey