RegQueryValueEx(E)
The RegQueryValueEx function retrieves the type and data for a specified value name associated with an open registry key.
函数RegQueryValueEx找回一个打开的注册表键值相关联的给定的变量数据或者变量。
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存储返回值的缓冲区的大小
);
Parameters
hKey
[in] Handle to a currently open key or one of the following predefined keys:
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
Windows NT/2000/XP: HKEY_PERFORMANCE_DATA
Windows XP: HKEY_PERFORMANCE_TEXT
Windows XP: HKEY_PERFORMANCE_NLSTEXT
Windows 95/98/Me: HKEY_DYN_DATA
lpValueName
[in] Pointer to a null-terminated string containing the name of the value to query.
If lpValueName is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any.
Windows 95/98/Me: Every key has a default value that initially does not contain data. On Windows 95, the default value type is always REG_SZ. On Windows 98, the type of a key's default value is initially REG_SZ, but RegSetValueEx can specify a default value with a different type.
Windows NT/2000/XP: Keys do not automatically have an unnamed or default value. Unnamed values can be of any type.
lpReserved
Reserved; must be NULL.
lpType
[out] Pointer to a variable that receives a code indicating the type of data stored in the specified value. For a list of the possible type codes, see Registry Value Types. The lpType parameter can be NULL if the t
The RegQueryValueEx function retrieves the type and data for a specified value name associated with an open registry key.
函数RegQueryValueEx找回一个打开的注册表键值相关联的给定的变量数据或者变量。
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存储返回值的缓冲区的大小
);
Parameters
hKey
[in] Handle to a currently open key or one of the following predefined keys:
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
Windows NT/2000/XP: HKEY_PERFORMANCE_DATA
Windows XP: HKEY_PERFORMANCE_TEXT
Windows XP: HKEY_PERFORMANCE_NLSTEXT
Windows 95/98/Me: HKEY_DYN_DATA
lpValueName
[in] Pointer to a null-terminated string containing the name of the value to query.
If lpValueName is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any.
Windows 95/98/Me: Every key has a default value that initially does not contain data. On Windows 95, the default value type is always REG_SZ. On Windows 98, the type of a key's default value is initially REG_SZ, but RegSetValueEx can specify a default value with a different type.
Windows NT/2000/XP: Keys do not automatically have an unnamed or default value. Unnamed values can be of any type.
lpReserved
Reserved; must be NULL.
lpType
[out] Pointer to a variable that receives a code indicating the type of data stored in the specified value. For a list of the possible type codes, see Registry Value Types. The lpType parameter can be NULL if the t