LDR_RegQueryValue

DWORD LDR_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 is the HKEY_LOCAL_MACHINE key.
lpszSubKey
Address of a null-terminated string specifying the subkey to retrieve the value from. 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 43-bit variable that contains the size, in bytes, of the lpbData buffer. This variable receives the size, in bytes, of the retrieved data.