术语 | regopenuserclassesroot |
释义 | RegOpenUserClassesRoot 语法: C++ LONG WINAPI RegOpenUserClassesRoot( __in HANDLE hToken, __reserved DWORD dwOptions, __in REGSAM samDesired, __out PHKEY phkResult ); RegOpenUserClassesRoot功能 检索的句柄HKEY_CLASSES_ROOT项为指定的用户。该用户标识的访问令牌。返回的主要有合并的注册表的内容,在HKEY_LOCAL_MACHINE \\ Software \\ Classes下与软件的内容主要\\在用户的注册表配置单元类项意见。有关更多信息,请参阅HKEY_CLASSES_ROOT项。 参数 hToken [in] 一个句柄,小学或模拟的访问令牌,用于标识用户的利益。这可能是一个象征性处理对LogonUser,CreateRestrictedToken,DuplicateToken,DuplicateTokenEx,OpenProcessToken,或OpenThreadToken函数调用返回。 句柄必须TOKEN_QUERY访问。有关更多信息,请访问权限的访问令牌对象。 dwOptions 这个参数是保留,必须为零。 samDesired [in] 阿面具,指定所需的访问权限的关键。函数失败如果关键的安全描述符不允许为调用进程的请求的访问。有关更多信息,请参见注册表关键的安全和访问权限。 phkResult [out] 一个变量,它接收的句柄打开的关键指针。当您不再需要返回的句柄,调用RegCloseKey函数关闭它。 返回值 如果函数成功,返回值是ERROR_SUCCESS。 如果函数失败,返回值是一个非零错误代码Winerror.h中定义。您可以使用带有FORMAT_MESSAGE_FROM_SYSTEM标记的FormatMessage函数获得错误的一般说明。 备注 该RegOpenUserClassesRoot功能,使您能够检索用户的交互式用户比其他的合并HKEY_CLASSES_ROOT的信息。例如,一个客户的服务器组件/服务器应用程序可以使用RegOpenUserClassesRoot检索合并为客户端的信息。 RegOpenUserClassesRoot失败如果指定用户的用户配置文件没有加载。当用户以交互方式登录,系统会自动加载用户的配置文件。对于其他用户,您可以调用LoadUserProfile函数加载用户的配置文件。然而,LoadUserProfile可能会非常费时,所以并没有要求为此目的,除非它是完全必要的用户的合并HKEY_CLASSES_ROOT的信息。 应用在交互方式登录的用户不需要使用RegOpenUserClassesRoot安全上下文中运行。这些应用程序可以调用RegOpenKeyEx函数以检索为交互式用户HKEY_CLASSES_ROOT项合并。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinreg.h(头文件:winuser.h) LibraryAdvapi32.lib DLLAdvapi32.dll 参见 LoadUserProfile RegCloseKey 登记职能 注册表概述 RegOpenKeyEx 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==RegOpenUserClassesRoot Function Retrieves a handle to the HKEY_CLASSES_ROOT key for a specified user. The user is identified by an access token. The returned key has a view of the registry that merges the contents of the HKEY_LOCAL_MACHINE\\Software\\Classes key with the contents of the Software\\Classes keys in the user's registry hive. For more information, see HKEY_CLASSES_ROOT Key . Syntax C++ LONG WINAPI RegOpenUserClassesRoot( __in HANDLE hToken, __reserved DWORD dwOptions, __in REGSAM samDesired, __out PHKEY phkResult ); Parameters hToken [in] A handle to a primary or impersonation access token that identifies the user of interest. This can be a token handle returned by a call to LogonUser , CreateRestrictedToken , DuplicateToken , DuplicateTokenEx , OpenProcessToken , or OpenThreadToken functions. The handle must have TOKEN_QUERY access. For more information, see Access Rights for Access-Token Objects . dwOptions This parameter is reserved and must be zero. 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 RegOpenUserClassesRoot function enables you to retrieve the merged HKEY_CLASSES_ROOT information for users other than the interactive user. For example, the server component of a client/server application could use RegOpenUserClassesRoot to retrieve the merged information for a client. RegOpenUserClassesRoot fails if the user profile for the specified user is not loaded. When a user logs on interactively, the system automatically loads the user's profile. For other users, you can call the LoadUserProfile function to load the user's profile. However, LoadUserProfile can be very time-consuming, so do not call it for this purpose unless it is absolutely necessary to have the user's merged HKEY_CLASSES_ROOT information. Applications running in the security context of the interactively logged-on user do not need to use RegOpenUserClassesRoot. These applications can call the RegOpenKeyEx function to retrieve a merged view of the HKEY_CLASSES_ROOT key for the interactive user. Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinreg.h (include Windows.h) LibraryAdvapi32.lib DLLAdvapi32.dll See Also LoadUserProfile RegCloseKey Registry Functions Registry Overview RegOpenKeyEx Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms724899(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。