1VC statement
12345678 |
LONG
RegQueryValueEx(
HKEY
hKey,
// handle to key
LPCTSTR
lpValueName,
// value name
LPDWORD
lpReserved,
// reserved
LPDWORD
lpType,
// type buffer
LPBYTE lpData,
// data buffer
LPDWORD
lpcbData
// size of data buffer
);
|
2 parameter description
Retrieves an open registry handle, specifying the type of registry key and setting the value. The return value long, 0 (ERROR_SUCCESS) indicates success. Any other value represents an error code parameter table parameter type and description HKey hkey,//a handle to an open item, or specify a standard item name LPCTSTR lpvaluename,//to get the name of the value, the name of the registry key Lpdword lpreserved,/ /unused, set to zero Lpdword lptype,//is used to mount a variable that retrieves the data type Lpbyte lpdata,//a buffer for loading the specified value Lpdword lpcbdata,//a variable to load the length of the lpdata buffer. Once returned, it is set to the number of bytes actually loaded into the buffer lpvaluename a string that points to the name of the value to be queried (ending with a null character). If lpvaluename is null or an empty string (""), this function retrieves the type and data of the unnamed or default value for this key. Windows 95 and Windows 98: Each key has a default value (originally does not contain data). In Windows 95, the default value type is always REG_SZ. In Windows 98, the default key type is initially REG_SZ, but you can specify a default value for a different type by RegSetValueEx. Windows NT: Keys cannot automatically have an unnamed or default value, and unnamed values can be of any type. Lpreserved reserved, must be null.
RegQueryValueEx retrieves an open registry handle, specifying the type of registry key and setting the value.