网站首页  词典首页

请输入您要查询的函数:

 

术语 rmstartsession
释义 RmStartSession
语法:
C++
DWORD WINAPI RmStartSession(
__out DWORD *pSessionHandle,
__reserved DWORD dwSessionFlags,
__out WCHAR strSessionKey[ ]
);
RmStartSession功能
开始一个新的启动管理器会话。重新启动的64个管理每个用户会话会话最多可开放的系统在同一时间。当此功能启动一个会话,它返回一个会话句柄和会话密钥可以在重新启动管理器的后续调用API的使用。
参数
pSessionHandle [out]
一个指向处理重新启动经理会议。这次会议句柄可以传递给重新启动管理器API的后续调用。
dwSessionFlags
保留。此参数应为0。
strSessionKey [out]
一个空结束的字符串,其中包含会话密钥到新的会话。该字符串必须分配,然后再调用RmStartSession功能。
返回值
这是最近收到的错误。该函数可以返回的系统错误在Winerror.h中定义的代码之一。
ValueMeaning
ERROR_SUCCESS
0The功能成功完成。
ERROR_SEM_TIMEOUT
121A条重新启动管理器的功能无法得到一个注册表写在规定的时间互斥。重新启动系统的建议,因为重新启动管理器进一步使用很可能会失败。
ERROR_BAD_ARGUMENTS
160One或多个参数不正确。此错误值返回的重新启动管理器的功能,如果一个NULL指针或0是一个参数,需要一个非空和非零值传递。
ERROR_MAX_SESSIONS_REACHED
353The会话的最大数目已经达到。
ERROR_WRITE_FAULT
29The系统无法写入指定的设备。
ERROR_OUTOFMEMORY
第14A条重新启动管理器操作无法完成,因为没有足够的内存是可用。
备注
该RmStartSession函数返回一个错误,如果具有相同会话密钥会议已经存在。
该RmStartSession职能应当由主调用安装程序,它控制用户界面或控制在一个更新多个补丁的安装顺序。
二次安装程序可以通过调用参加会议的处理和会话密钥从小学安装RmStartSession函数调用函数返回的RmJoinSession现有的重新启动管理会议。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderRestartManager.h
LibraryRstrtmgr.lib
DLLRstrtmgr.dll
参见
RmEndSession
RmJoinSession
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==RmStartSession Function
Starts a new Restart Manager session. A maximum of 64 Restart Manager sessions per user session can be open on the system at the same time. When this function starts a session, it returns a session handle and session key that can be used in subsequent calls to the Restart Manager API.
Syntax
C++
DWORD WINAPI RmStartSession(
__out DWORD *pSessionHandle,
__reserved DWORD dwSessionFlags,
__out WCHAR strSessionKey[ ]
);
Parameters
pSessionHandle [out]
A pointer to the handle of a Restart Manager session. The session handle can be passed in subsequent calls to the Restart Manager API.
dwSessionFlags
Reserved. This parameter should be 0.
strSessionKey [out]
A null-terminated string that contains the session key to the new session. The string must be allocated before calling the RmStartSession function.
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 function completed successfully.
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 the Restart Manager function if a NULL pointer or 0 is passed in a parameter that requires a non-null and non-zero value.
ERROR_MAX_SESSIONS_REACHED
353The maximum number of sessions has been reached.
ERROR_WRITE_FAULT
29The system cannot write to the specified device.
ERROR_OUTOFMEMORY
14A Restart Manager operation could not complete because not enough memory was available.

Remarks
The RmStartSession function returns an error if a session with the same session key already exists.
The RmStartSession function should be called by the primary installer that controls the user interface or that controls the installation sequence of multiple patches in an update.
A secondary installer can join an existing Restart Manager session by calling the RmJoinSession function with the session handle and session key returned from the RmStartSession function call of the primary installer.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderRestartManager.h
LibraryRstrtmgr.lib
DLLRstrtmgr.dll
See Also
RmEndSession
RmJoinSession
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa373668(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:24:45