网站首页  词典首页

请输入您要查询的函数:

 

术语 regopencurrentuser
释义 RegOpenCurrentUser
语法:
C++
LONG WINAPI RegOpenCurrentUser(
__in REGSAM samDesired,
__out PHKEY phkResult
);
RegOpenCurrentUser功能
检索的句柄,为用户当前线程模拟HKEY_CURRENT_USER项。
参数
samDesired [in]
阿面具,指定所需的访问权限的关键。函数失败如果关键的安全描述符不允许为调用进程的请求的访问。有关更多信息,请参见注册表关键的安全和访问权限。
phkResult [out]
一个变量,它接收的句柄打开的关键指针。当您不再需要返回的句柄,调用RegCloseKey函数关闭它。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是一个非零错误代码Winerror.h中定义。您可以使用带有FORMAT_MESSAGE_FROM_SYSTEM标记的FormatMessage函数获得错误的一般说明。
备注
到当前用户的分支在HKEY_USERS根键HKEY_CURRENT_USER项地图。这是缓存进程中的所有线程。因此,此值不会更改当另一个用户的配置文件被加载。 RegOpenCurrentUser使用线程的凭证,以使用适当的键,或默认,如果没有加载配置文件。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinreg.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
参见
RegCloseKey
登记职能
注册表概述
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==RegOpenCurrentUser Function
Retrieves a handle to the HKEY_CURRENT_USER key for the user the current thread is impersonating.
Syntax
C++
LONG WINAPI RegOpenCurrentUser(
__in REGSAM samDesired,
__out PHKEY phkResult
);
Parameters
samDesired [in]
A mask that specifies the desired access rights to the key. The function fails if the security descriptor of the key does not permit the requested access for the calling process. For more information, see Registry Key Security and Access Rights .
phkResult [out]
A pointer to a variable that receives a handle to the opened key. When you no longer need the returned handle, call the RegCloseKey function to close it.
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
The HKEY_CURRENT_USER key maps to the root of the current user's branch in the HKEY_USERS key. It is cached for all threads in a process. Therefore, this value does not change when another user's profile is loaded. RegOpenCurrentUser uses the thread's token to access the appropriate key, or the default if the profile is not loaded.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinreg.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
See Also
RegCloseKey
Registry Functions
Registry Overview
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms724894(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:26:29