网站首页  词典首页

请输入您要查询的函数:

 

术语 regdeletekeyex
释义 RegDeleteKeyEx
语法:
C++
LONG WINAPI RegDeleteKeyEx(
__in HKEY hKey,
__in LPCTSTR lpSubKey,
__in REGSAM samDesired,
__reserved DWORD Reserved
);
RegDeleteKeyEx功能
删除一个子项,其值从指定的平台,登记处的具体意见。请注意,键名不区分大小写。
要删除一个子项交易操作,调用RegDeleteKeyTransacted功能。
参数
hKey [in]
句柄到打开注册表项。在这个关键不影响删除操作的访问权限。如需有关访问权限的信息,请参阅注册表关键的安全和访问权限。
这种处理是由RegCreateKeyEx的或RegOpenKeyEx函数,返回的,也可以是下列预定义项之一:
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
lpSubKey [in]
键的名称被删除。这关键的必须是由hKey参数值指定的键子。
该函数打开与删除访问权的子项。
键名不区分大小写。
这个参数的值不能为NULL。
samDesired [in]
访问掩码的指定平台,登记处的具体意见。
ValueMeaning
KEY_WOW64_32KEY
0x0200Delete从32位注册表视图的关键。
KEY_WOW64_64KEY
0x0100Delete从64位注册表视图的关键。
保留
这个参数是保留,必须为零。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是一个非零错误代码Winerror.h中定义。您可以使用带有FORMAT_MESSAGE_FROM_SYSTEM标记的FormatMessage函数获得错误的一般说明。
备注
已删除的关键不是删除,直到最后一个句柄,它已关闭。
WOW64上,32位应用程序查看注册表树,它是从注册表树单独的64位应用程序视图。此功能使应用程序在删除备用注册表视图项。
该子项删除不能有子项。要删除一个键及其所有子项,您需要枚举子项,并删除他们的个人。要删除键递归,使用RegDeleteTree或SHDeleteKey功能。
如果函数成功,RegDeleteKeyEx删除从注册表中指定的键。整个关键,包括其所有值,将被删除。
要求:
最低支持clientWindows Vista中,Windows XP Professional x64版本
最低支持serverWindows Server 2008中时,Windows Server 2003 SP1的
HeaderWinreg.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode和ANSI namesRegDeleteKeyExW(Unicode)和RegDeleteKeyExA(ANSI)的
参见
RegCreateKeyEx的
RegDeleteKeyTransacted
注册表重定向
登记职能
RegOpenKeyEx
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==RegDeleteKeyEx Function
Deletes a subkey and its values from the specified platform-specific view of the registry. Note that key names are not case sensitive.
To delete a subkey as a transacted operation, call the RegDeleteKeyTransacted function.
Syntax
C++
LONG WINAPI RegDeleteKeyEx(
__in HKEY hKey,
__in LPCTSTR lpSubKey,
__in REGSAM samDesired,
__reserved DWORD Reserved
);
Parameters
hKey [in]
A handle to an open registry key. The access rights of this key do not affect the delete operation. For more information about access rights, see Registry Key Security and Access Rights .
This handle is returned by the RegCreateKeyEx or RegOpenKeyEx function, or it can be one of the following predefined keys :
HKEY_CLASSES_ROOT
HKEY_CURRENT_CONFIG
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
lpSubKey [in]
The name of the key to be deleted. This key must be a subkey of the key specified by the value of the hKey parameter.
The function opens the subkey with the DELETE access right.
Key names are not case sensitive.
The value of this parameter cannot be NULL.
samDesired [in]
An access mask the specifies the platform-specific view of the registry.
ValueMeaning
KEY_WOW64_32KEY
0x0200Delete the key from the 32-bit registry view.
KEY_WOW64_64KEY
0x0100Delete the key from the 64-bit registry view.

Reserved
This parameter is reserved and must be zero.
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
A deleted key is not removed until the last handle to it is closed.
On WOW64, 32-bit applications view a registry tree that is separate from the registry tree that 64-bit applications view. This function enables an application to delete an entry in the alternate registry view.
The subkey to be deleted must not have subkeys. To delete a key and all its subkeys, you need to enumerate the subkeys and delete them individually. To delete keys recursively, use the RegDeleteTree or SHDeleteKey function.
If the function succeeds, RegDeleteKeyEx removes the specified key from the registry. The entire key, including all of its values, is removed.
Requirements
Minimum supported clientWindows Vista, Windows XP Professional x64 Edition
Minimum supported serverWindows Server 2008, Windows Server 2003 with SP1
HeaderWinreg.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode and ANSI namesRegDeleteKeyExW (Unicode) and RegDeleteKeyExA (ANSI)
See Also
RegCreateKeyEx
RegDeleteKeyTransacted
Registry Redirector
Registry Functions
RegOpenKeyEx
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724847(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:16:36