网站首页  词典首页

请输入您要查询的函数:

 

术语 rmregisterresources
释义 RmRegisterResources
语法:
C++
DWORD WINAPI RmRegisterResources(
__in DWORD dwSessionHandle,
__in UINT nFiles,
__in_opt LPCWSTR rgsFilenames[ ],
__in UINT nApplications,
__in_opt RM_UNIQUE_PROCESS rgApplications[ ],
__in UINT nServices,
__in_opt LPCWSTR rgsServiceNames[ ]
);
RmRegisterResources功能
寄存器资源的重新启动管理器会话。重新启动管理器使用了与会议,以确定哪些应用程序和服务,必须关闭并重新启动注册的资源列表。资源可以通过一些文件名,服务的简短名称或RM_UNIQUE_PROCESS结构描述运行的应用程序。该RmRegisterResources函数可以使用或小学的安装程序。
参数
dwSessionHandle [in]
句柄到现有的重新启动管理会议。
nFiles [in]
的文件数目登记。
rgsFilenames [中,可选]
一个空数组结尾的完整文件名的路径字符串。此参数可以为NULL,如果nFiles为0。
nApplications [in]
在登记过程的数目。
rgApplications [中,可选]
一个RM_UNIQUE_PROCESS结构的数组。此参数可以为NULL,如果nApplications为0。
nServices [in]
服务的数量进行登记。
rgsServiceNames [中,可选]
一个空数组,字符串终止服务的短名称。此参数可以为NULL,如果nServices为0。
返回值
这是最近收到的错误。该函数可以返回的系统错误在Winerror.h中定义的代码之一。
ValueMeaning
ERROR_SUCCESS
0The资源指定已被注册。
ERROR_SEM_TIMEOUT
121A条重新启动管理器的功能无法得到一个注册表写在规定的时间互斥。重新启动系统的建议,因为重新启动管理器进一步使用很可能会失败。
ERROR_BAD_ARGUMENTS
160One或多个参数不正确。此错误值返回重新启动管理器的功能,如果一个NULL指针或0是一个参数,需要一个非空和非零值传递。
ERROR_WRITE_FAULT
29An行动是无法读取或写入注册表。
ERROR_OUTOFMEMORY
第14A条重新启动管理器操作无法完成,因为没有足够的内存是可用。
出现ERROR_INVALID_HANDLE
6No存在重新启动管理会议提供的句柄。
备注
每到RmRegisterResources函数调用执行写操作相对昂贵。不要调用此函数一次每个文件,而不是将相关文件一起到组件和注册这些在一起。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderRestartManager.h
LibraryRstrtmgr.lib
DLLRstrtmgr.dll
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==RmRegisterResources Function
Registers resources to a Restart Manager session. The Restart Manager uses the list of resources registered with the session to determine which applications and services must be shut down and restarted. Resources can be identified by filenames, service short names, or RM_UNIQUE_PROCESS structures that describe running applications. The RmRegisterResources function can be used by a primary or secondary installer.
Syntax
C++
DWORD WINAPI RmRegisterResources(
__in DWORD dwSessionHandle,
__in UINT nFiles,
__in_opt LPCWSTR rgsFilenames[ ],
__in UINT nApplications,
__in_opt RM_UNIQUE_PROCESS rgApplications[ ],
__in UINT nServices,
__in_opt LPCWSTR rgsServiceNames[ ]
);
Parameters
dwSessionHandle [in]
A handle to an existing Restart Manager session.
nFiles [in]
The number of files being registered.
rgsFilenames [in, optional]
An array of null-terminated strings of full filename paths. This parameter can be NULL if nFiles is 0.
nApplications [in]
The number of processes being registered.
rgApplications [in, optional]
An array of RM_UNIQUE_PROCESS structures. This parameter can be NULL if nApplications is 0.
nServices [in]
The number of services to be registered.
rgsServiceNames [in, optional]
An array of null-terminated strings of service short names. This parameter can be NULL if nServices is 0.
Return Value
This is the most recent error received. The function can return one of the system error codes that are defined in Winerror.h.
ValueMeaning
ERROR_SUCCESS
0The resources specified have been registered.
ERROR_SEM_TIMEOUT
121A Restart Manager function could not obtain a Registry write mutex in the allotted time. A system restart is recommended because further use of the Restart Manager is likely to fail.
ERROR_BAD_ARGUMENTS
160One or more arguments are not correct. This error value is returned by Restart Manager function if a NULL pointer or 0 is passed in a parameter that requires a non-null and non-zero value.
ERROR_WRITE_FAULT
29An operation was unable to read or write to the registry.
ERROR_OUTOFMEMORY
14A Restart Manager operation could not complete because not enough memory was available.
ERROR_INVALID_HANDLE
6No Restart Manager session exists for the handle supplied.

Remarks
Each call to the RmRegisterResources function performs relatively expensive write operations. Do not call this function once per file, instead group related files together into components and register these together.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderRestartManager.h
LibraryRstrtmgr.lib
DLLRstrtmgr.dll
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa373663(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 更新时间:2025/12/16 2:32:13