网站首页  词典首页

请输入您要查询的函数:

 

术语 regqueryinfokey
释义 RegQueryInfoKey
语法:
C++
LONG WINAPI RegQueryInfoKey(
__in HKEY hKey,
__out LPTSTR lpClass,
__inout_opt LPDWORD lpcClass,
__reserved LPDWORD lpReserved,
__out_opt LPDWORD lpcSubKeys,
__out_opt LPDWORD lpcMaxSubKeyLen,
__out_opt LPDWORD lpcMaxClassLen,
__out_opt LPDWORD lpcValues,
__out_opt LPDWORD lpcMaxValueNameLen,
__out_opt LPDWORD lpcMaxValueLen,
__out_opt LPDWORD lpcbSecurityDescriptor,
__out_opt PFILETIME lpftLastWriteTime
);
RegQueryInfoKey功能
信息检索指定的注册表项。
参数
hKey [in]
句柄到打开注册表项。密钥必须与已开放的KEY_QUERY_VALUE访问权限。有关更多信息,请参见注册表关键的安全和访问权限。
这种处理是由RegCreateKeyEx的,RegCreateKeyTransacted,RegOpenKeyEx,或RegOpenKeyTransacted函数返回。它也可以是下列预定义项之一:
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_PERFORMANCE_DATA
HKEY_USERSlpClass [out]
阿一个缓冲区,它接收用户定义的关键类的指针。此参数可以为NULL。
lpcClass [中,指出,可选]
一个变量,它指定的缓冲区大小的指针指向的lpClass参数,以字符。
大小应包括终止空字符。当函数返回时,该变量包含类的字符串存储在缓冲区的大小。伯爵返回不包括终止空字符。如果缓冲区不够大,则函数返回ERROR_MORE_DATA,和变量包含的字符字符串的大小,不计终止空字符。
如果lpClass为NULL,lpcClass可以为NULL。
如果lpClass参数是一个有效的地址,但lpcClass参数没有,例如,它为NULL,则函数返回ERROR_INVALID_PARAMETER。
lpReserved
这个参数是保留,必须为NULL。
lpcSubKeys [指出,可选]
一个变量,它接收的是由指定的密钥中包含若干子项指针。此参数可以为NULL。
lpcMaxSubKeyLen [指出,可选]
对变量的接收与名称最长的键的子项的大小,在Unicode字符,不包括终止空字符指针。此参数可以为NULL。
lpcMaxClassLen [指出,可选]
一个变量,它接收最长的字符串,指定一个子类的Unicode字符,大小的指针。伯爵返回不包括终止空字符。此参数可以为NULL。
lpcValues [指出,可选]
一个变量,它接收的是与关键相关的许多值的指针。此参数可以为NULL。
lpcMaxValueNameLen [指出,可选]
对变量的接收,在Unicode字符键的最长的数值名称的大小,指针。大小不包括终止空字符。此参数可以为NULL。
lpcMaxValueLen [指出,可选]
一个变量,它接收到一个新的重要的价值观元件尺寸最长的数据指针,以字节为单位。此参数可以为NULL。
lpcbSecurityDescriptor [指出,可选]
一个变量,它接收关键的安全描述符大小,以字节的指针。此参数可以为NULL。
lpftLastWriteTime [指出,可选]
一个FILETIME结构,得到最后写入时间的指针。此参数可以为NULL。
该函数设置了FILETIME结构的成员,以显示最后一次的关键或其值项的任何修改。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是一个系统错误代码。
如果lpClass缓冲区太小得到类的名称,该函数返回ERROR_MORE_DATA。
实例
有关示例,请参见枚举注册表子项。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinreg.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode和ANSI namesRegQueryInfoKeyW(Unicode)和RegQueryInfoKeyA(ANSI)的
参见
FILETIME
RegDeleteKey
RegEnumValue
RegEnumKeyEx
登记职能
注册表概述
RegQueryValueEx
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==RegQueryInfoKey Function
Retrieves information about the specified registry key.
Syntax
C++
LONG WINAPI RegQueryInfoKey(
__in HKEY hKey,
__out LPTSTR lpClass,
__inout_opt LPDWORD lpcClass,
__reserved LPDWORD lpReserved,
__out_opt LPDWORD lpcSubKeys,
__out_opt LPDWORD lpcMaxSubKeyLen,
__out_opt LPDWORD lpcMaxClassLen,
__out_opt LPDWORD lpcValues,
__out_opt LPDWORD lpcMaxValueNameLen,
__out_opt LPDWORD lpcMaxValueLen,
__out_opt LPDWORD lpcbSecurityDescriptor,
__out_opt PFILETIME lpftLastWriteTime
);
Parameters
hKey [in]
A handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right. For more information, see Registry Key Security and Access Rights .
This handle is returned by the RegCreateKeyEx , RegCreateKeyTransacted , RegOpenKeyEx , or RegOpenKeyTransacted function. It can also be one of the following predefined keys :
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_PERFORMANCE_DATA
HKEY_USERSlpClass [out]
A pointer to a buffer that receives the user-defined class of the key. This parameter can be NULL.
lpcClass [in, out, optional]
A pointer to a variable that specifies the size of the buffer pointed to by the lpClass parameter, in characters.
The size should include the terminating null character. When the function returns, this variable contains the size of the class string that is stored in the buffer. The count returned does not include the terminating null character. If the buffer is not big enough, the function returns ERROR_MORE_DATA, and the variable contains the size of the string, in characters, without counting the terminating null character.
If lpClass is NULL, lpcClass can be NULL.
If the lpClass parameter is a valid address, but the lpcClass parameter is not, for example, it is NULL, then the function returns ERROR_INVALID_PARAMETER.
lpReserved
This parameter is reserved and must be NULL.
lpcSubKeys [out, optional]
A pointer to a variable that receives the number of subkeys that are contained by the specified key. This parameter can be NULL.
lpcMaxSubKeyLen [out, optional]
A pointer to a variable that receives the size of the key's subkey with the longest name, in Unicode characters, not including the terminating null character. This parameter can be NULL.
lpcMaxClassLen [out, optional]
A pointer to a variable that receives the size of the longest string that specifies a subkey class, in Unicode characters. The count returned does not include the terminating null character. This parameter can be NULL.
lpcValues [out, optional]
A pointer to a variable that receives the number of values that are associated with the key. This parameter can be NULL.
lpcMaxValueNameLen [out, optional]
A pointer to a variable that receives the size of the key's longest value name, in Unicode characters. The size does not include the terminating null character. This parameter can be NULL.
lpcMaxValueLen [out, optional]
A pointer to a variable that receives the size of the longest data component among the key's values, in bytes. This parameter can be NULL.
lpcbSecurityDescriptor [out, optional]
A pointer to a variable that receives the size of the key's security descriptor, in bytes. This parameter can be NULL.
lpftLastWriteTime [out, optional]
A pointer to a FILETIME structure that receives the last write time. This parameter can be NULL.
The function sets the members of the FILETIME structure to indicate the last time that the key or any of its value entries is modified.
Return Value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a system error code .
If the lpClass buffer is too small to receive the name of the class, the function returns ERROR_MORE_DATA.
Examples
For an example, see Enumerating Registry Subkeys .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinreg.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode and ANSI namesRegQueryInfoKeyW (Unicode) and RegQueryInfoKeyA (ANSI)
See Also
FILETIME
RegDeleteKey
RegEnumValue
RegEnumKeyEx
Registry Functions
Registry Overview
RegQueryValueEx
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724902(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 13:23:02