网站首页  词典首页

请输入您要查询的函数:

 

术语 regloadkey
释义 RegLoadKey
语法:
C++
LONG WINAPI RegLoadKey(
__in HKEY hKey,
__in_opt LPCTSTR lpSubKey,
__in LPCTSTR lpFile
);
RegLoadKey功能
创建一个在HKEY_USERS或HKEY_LOCAL_MACHINE并加载到子项,从该子项指定的注册表配置单元的数据。
参数
hKey [in]
句柄的地方子项将创建的关键。这可以是一个处理向RegConnectRegistry,或下列之一调用返回预定义的处理:
HKEY_LOCAL_MACHINE
HKEY_USERS
这个函数总是加载在注册表的层次最高的信息。在HKEY_CLASSES_ROOT和HKEY_CURRENT_USER处理值不能为此参数指定的,因为他们代表HKEY_LOCAL_MACHINE和HKEY_USERS子集句柄值,分别为。
lpSubKey [中,可选]
键的名称下创建hKey。该子项就是从文件的注册信息将被加载。
键名不区分大小写。
有关更多信息,请注册元素的大小限制。
lpFile [in]
在包含注册表数据文件的名称。此文件必须是本地文件,是与RegSaveKey函数创建。如果此文件不存在,一个文件被创建具有指定名称。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是一个非零错误代码Winerror.h中定义。您可以使用带有FORMAT_MESSAGE_FROM_SYSTEM标记的FormatMessage函数获得错误的一般说明。
备注
有两个注册表配置文件格式。注册表配置单元创建当前的操作系统通常不能由早先的加载系统。
如果hKey是句柄返回RegConnectRegistry,然后在lpFile指定的路径是相对于远程计算机。
调用进程必须在计算机上的注册表中,居住SE_RESTORE_NAME和SE_BACKUP_NAME特权。有关更多信息,请运行特权。无需加载这些特殊权限的配置单元,使用RegLoadAppKey功能。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinreg.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode和ANSI namesRegLoadKeyW(Unicode)和RegLoadKeyA(ANSI)的
参见
RegConnectRegistry
RegDeleteKey
登记职能
注册表配置单元
RegLoadAppKey
RegReplaceKey
RegRestoreKey
RegSaveKey
RegUnLoadKey
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==RegLoadKey Function
Creates a subkey under HKEY_USERS or HKEY_LOCAL_MACHINE and loads the data from the specified registry hive into that subkey.
Syntax
C++
LONG WINAPI RegLoadKey(
__in HKEY hKey,
__in_opt LPCTSTR lpSubKey,
__in LPCTSTR lpFile
);
Parameters
hKey [in]
A handle to the key where the subkey will be created. This can be a handle returned by a call to RegConnectRegistry , or one of the following predefined handles:
HKEY_LOCAL_MACHINE
HKEY_USERS
This function always loads information at the top of the registry hierarchy. The HKEY_CLASSES_ROOT and HKEY_CURRENT_USER handle values cannot be specified for this parameter, because they represent subsets of the HKEY_LOCAL_MACHINE and HKEY_USERS handle values, respectively.
lpSubKey [in, optional]
The name of the key to be created under hKey. This subkey is where the registration information from the file will be loaded.
Key names are not case sensitive.
For more information, see Registry Element Size Limits .
lpFile [in]
The name of the file containing the registry data. This file must be a local file that was created with the RegSaveKey function. If this file does not exist, a file is created with the specified name.
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
There are two registry hive file formats. Registry hives created on current operating systems typically cannot be loaded by earlier ones.
If hKey is a handle returned by RegConnectRegistry, then the path specified in lpFile is relative to the remote computer.
The calling process must have the SE_RESTORE_NAME and SE_BACKUP_NAME privileges on the computer in which the registry resides. For more information, see Running with Special Privileges . To load a hive without requiring these special privileges, use the RegLoadAppKey function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinreg.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode and ANSI namesRegLoadKeyW (Unicode) and RegLoadKeyA (ANSI)
See Also
RegConnectRegistry
RegDeleteKey
Registry Functions
Registry Hive
RegLoadAppKey
RegReplaceKey
RegRestoreKey
RegSaveKey
RegUnLoadKey
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724889(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:28:44