_RegQueryValue

DWORD _RegQueryValue(HKEY hKey, LPSTR lpszSubKey, LPBYTE lpbData,
      LPDWORD lpcbData)
 

Retrieves the value for the given registry key.

hKey
Handle of a previously opened key or one of the predefined root keys given in Predefined Keys.
lpszSubKey
Address of a null-terminated string specifying the subkey for which to retrieve the value. Can be NULL or point to a NULL-string.
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.