网站首页  词典首页

请输入您要查询的函数:

 

术语 regquerymultiplevalues
释义 RegQueryMultipleValues
语法:
C++
LONG WINAPI RegQueryMultipleValues(
__in HKEY hKey,
__out PVALENT val_list,
__in DWORD num_vals,
__out_opt LPTSTR lpValueBuf,
__inout_opt LPDWORD ldwTotsize
);
RegQueryMultipleValues功能
检索类型和一个开放的注册表项关联的值名称列表数据。
参数
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_USERS
val_list [out]
一个对价结构的数组的指针,描述一个或多个值项。在输入,每个结构ve_valuename成员必须包含一个指针的值的名称来检索。函数失败如果指定的值不存在任何在指定的关键。
在功能,如果成功,数组的每个元素包含指定价值的资料。
num_vals [in]
在该val_list数组元素的个数。
lpValueBuf [指出,可选]
一个缓冲区的指针。如果函数成功,缓冲区接收每个价值的资料。
如果lpValueBuf为NULL,则所指向的价值ldwTotsize参数必须是零,在这种情况下,函数返回ERROR_MORE_DATA和ldwTotsize接收所需的缓冲区大小,以字节。
ldwTotsize [中,指出,可选]
A pointer to a variable that specifies the size of the buffer pointed to by the lpValueBuf parameter, in bytes.如果函数成功,ldwTotsize收到复制到缓冲区的字节数。如果函数失败,因为缓冲区太小,ldwTotsize接收到所需的大小,以字节为单位。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是下面的错误代码之一。
返回codeDescription
ERROR_CANTREADRegQueryMultipleValues无法实例或访问了动态的主要提供者。
ERROR_MORE_DATAThe缓冲区指向lpValueBuf太小了。在这种情况下,ldwTotsize获得所需的缓冲区大小。
ERROR_TRANSFER_TOO_LONGThe总面积的请求的数据(大小的val_list阵列+ ldwTotSize)是比1兆字节系统限制更多。
备注
该RegQueryMultipleValues函数允许应用程序查询的一个或多个静态或动态的关键价值。如果目标的关键是一种静态的关键,该系统提供了一个原子的方式对所有的值。为了防止过度序列化,汇总数据的函数返回不能超过1兆字节。
如果目标的关键是一个动态的关键,其提供者必须提供一个原子的方式在所有值。这意味着供应商应填写的结果缓冲区同步,提供所有在缓冲区价值观相一致意见,同时避免过多的序列化。供应商可以提供最多一个原子在调用这个函数总产量兆字节的数据。
RegQueryMultipleValues远程支持,也就是说,在hKey参数传递给函数的可参照到远程计算机。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinreg.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode和ANSI namesRegQueryMultipleValuesW(Unicode)和RegQueryMultipleValuesA(ANSI)的
参见
登记职能
注册表概述
瓦伦特
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==RegQueryMultipleValues Function
Retrieves the type and data for a list of value names associated with an open registry key.
Syntax
C++
LONG WINAPI RegQueryMultipleValues(
__in HKEY hKey,
__out PVALENT val_list,
__in DWORD num_vals,
__out_opt LPTSTR lpValueBuf,
__inout_opt LPDWORD ldwTotsize
);
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_USERS
val_list [out]
A pointer to an array of VALENT structures that describe one or more value entries. On input, the ve_valuename member of each structure must contain a pointer to the name of a value to retrieve. The function fails if any of the specified values do not exist in the specified key.
If the function succeeds, each element of the array contains the information for the specified value.
num_vals [in]
The number of elements in the val_list array.
lpValueBuf [out, optional]
A pointer to a buffer. If the function succeeds, the buffer receives the data for each value.
If lpValueBuf is NULL, the value pointed to by the ldwTotsize parameter must be zero, in which case the function returns ERROR_MORE_DATA and ldwTotsize receives the required size of the buffer, in bytes.
ldwTotsize [in, out, optional]
A pointer to a variable that specifies the size of the buffer pointed to by the lpValueBuf parameter, in bytes. If the function succeeds, ldwTotsize receives the number of bytes copied to the buffer. If the function fails because the buffer is too small, ldwTotsize receives the required size, in bytes.
Return Value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is one of the following error codes.
Return codeDescription
ERROR_CANTREADRegQueryMultipleValues cannot instantiate or access the provider of the dynamic key.
ERROR_MORE_DATAThe buffer pointed to by lpValueBuf was too small. In this case, ldwTotsize receives the required buffer size.
ERROR_TRANSFER_TOO_LONGThe total size of the requested data (size of the val_list array + ldwTotSize) is more than the system limit of one megabyte.

Remarks
The RegQueryMultipleValues function allows an application to query one or more values of a static or dynamic key. If the target key is a static key, the system provides all of the values in an atomic fashion. To prevent excessive serialization, the aggregate data returned by the function cannot exceed one megabyte.
If the target key is a dynamic key, its provider must provide all the values in an atomic fashion. This means the provider should fill the results buffer synchronously, providing a consistent view of all the values in the buffer while avoiding excessive serialization. The provider can provide at most one megabyte of total output data during an atomic call to this function.
RegQueryMultipleValues is supported remotely; that is, the hKey parameter passed to the function can refer to a remote computer.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinreg.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode and ANSI namesRegQueryMultipleValuesW (Unicode) and RegQueryMultipleValuesA (ANSI)
See Also
Registry Functions
Registry Overview
VALENT
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724905(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:17:45