_RegQueryValueEx
DWORD _RegQueryValueEx(HKEY hKey, LPSTR lpszValueName,
LPDWORD lpdwReserved, LPDWORD lpdwType, LPBYTE lpbData,
LPDWORD lpcbData)
Retrieves the value for the given registry key for the given value name.
- Returns ERROR_SUCCESS if successful; otherwise, one of the error values given in Error Values.
- hKey
- Handle of a previously opened key or one of the predefined root keys given in Predefined Keys.
- lpszValueName
- Address of a null-terminated string specifying the value name to for which to retrieve the value. Can be NULL or point to a NULL-string.
- lpdwReserved
- Reserved; set to NULL.
- lpdwType
- Address of a 32-bit variable that receives the data type for the given value. Can be NULL if data type is not needed.
- lpbData
- Address of a buffer that receives the value data for given registry key.
- lpcbData
- Address of a 32-bit variable that contains the size, in bytes, of the lpbData buffer. This variable receives the size, in bytes, of the retrieved data.