网站首页  词典首页

请输入您要查询的函数:

 

术语 regloadappkey
释义 RegLoadAppKey
语法:
C++
LONG WINAPI RegLoadAppKey(
__in LPCTSTR lpFile,
__out PHKEY phkResult,
__in REGSAM samDesired,
__in DWORD dwOptions,
__reserved DWORD Reserved
);
RegLoadAppKey功能
加载指定的注册表配置单元。
参数
lpFile [in]
该文件具有注册表数据的名称。此配置单元必须已创建的RegSaveKey功能。
phkResult [out]
该句柄所加载配置单元的根源。
唯一的办法在蜂巢中的访问键通过这种处理。注册表将阻止一键访问此配置单元中的应用使用绝对路径的关键。在此配置单元的键不能枚举。
samDesired [in]
阿掩码指定了关键的访问权限。有关更多信息,请参见注册表关键的安全和访问权限。
dwOptions [in]
如果这个参数是REG_PROCESS_APPKEY,蜂巢不能被加载,而另一个进程是它的调用进程加载。否则,可以加载多个进程在同一时间的配置单元。
保留
This parameter is reserved.
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是一个非零错误代码Winerror.h中定义。您可以使用带有FORMAT_MESSAGE_FROM_SYSTEM标记的FormatMessage函数获得错误的一般说明。
备注
单元内所有的键都必须具有相同的安全描述符,否则,该函数将失败。此安全描述符必须给予调用的samDesired参数或函数指定的访问将失败。您不能使用任何单元内主要的RegSetKeySecurity功能。
每个进程可以加载在一次只能有一个配置单元。
该配置单元时自动卸载所有句柄蜂巢内关闭的钥匙。
要编译的应用程序使用此功能,定义_WIN32_WINNT为0x0600或更高版本。有关详细信息,请参阅使用Windows头。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinreg.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode和ANSI namesRegLoadAppKeyW(Unicode)和RegLoadAppKeyA(ANSI)的
参见
登记职能
注册表配置单元
RegSaveKey
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==RegLoadAppKey Function
Loads the specified registry hive.
Syntax
C++
LONG WINAPI RegLoadAppKey(
__in LPCTSTR lpFile,
__out PHKEY phkResult,
__in REGSAM samDesired,
__in DWORD dwOptions,
__reserved DWORD Reserved
);
Parameters
lpFile [in]
The name of the file that has the registry data. This hive must have been created with the RegSaveKey function.
phkResult [out]
The handle to the root of the loaded hive.
The only way to access keys in the hive is through this handle. The registry will prevent an application from accessing keys in this hive using an absolute path to the key. The keys in this hive cannot be enumerated.
samDesired [in]
A mask that specifies the access rights for the key. For more information, see Registry Key Security and Access Rights .
dwOptions [in]
If this parameter is REG_PROCESS_APPKEY, the hive cannot be loaded by another process while is it loaded by the calling process. Otherwise, multiple processes can load the hive at the same time.
Reserved
This parameter is reserved.
Return Value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is a nonzero error code defined in Winerror.h. You can use the FormatMessage function with the FORMAT_MESSAGE_FROM_SYSTEM flag to get a generic description of the error.
Remarks
All keys inside the hive must have the same security descriptor, otherwise the function will fail. This security descriptor must grant the caller the access specified by the samDesired parameter or the function will fail. You cannot use the RegSetKeySecurity function on any key inside the hive.
Each process can load only one hive at a time.
The hive is automatically unloaded when all handles to the keys inside the hive are closed.
To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or later. For more information, see Using the Windows Headers .
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinreg.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode and ANSI namesRegLoadAppKeyW (Unicode) and RegLoadAppKeyA (ANSI)
See Also
Registry Functions
Registry Hive
RegSaveKey
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724886(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 11:29:29