网站首页  词典首页

请输入您要查询的函数:

 

术语 rmrestart
释义 RmRestart
语法:
C++
DWORD WINAPI RmRestart(
__in DWORD dwSessionHandle,
__reserved DWORD dwRestartFlags,
__in_opt RM_WRITE_STATUS_CALLBACK fnStatus
);
RmRestart功能
重新启动应用程序和服务已被关闭的RmShutdown职能,已经登记重新启动使用RegisterApplicationRestart功能。此功能只能称为由主安装程序称为RmStartSession函数启动重新启动管理会议。
参数
dwSessionHandle [in]
阿处理现有的重新启动管理会议。
dwRestartFlags
保留。此参数应为0。
fnStatus [中,可选]
一个状态消息的回调函数,用于通信的地位,而RmRestart功能正在运行的指针。如果为NULL,没有地位提供。
返回值
这是最近收到的错误。该函数可以返回的系统错误在Winerror.h中定义的代码之一。
ValueMeaning
ERROR_REQUEST_OUT_OF_SEQUENCE
776This返回错误值,如果RmRestart功能是一个有效的会话句柄之前调用调用RmShutdown功能。
ERROR_FAIL_RESTART
352One或多个应用程序可能无法重新启动。该RM_PROCESS_INFO是由RmGetList函数返回的结构包含更新的状态信息。
ERROR_SEM_TIMEOUT
121A条重新启动管理器的功能无法得到注册表写在规定的时间互斥。重新启动系统的建议,因为重新启动管理器进一步使用很可能会失败。
ERROR_CANCELLED
1223This错误值是由RmRestart函数返回时,要求取消一项行动是成功的。
ERROR_BAD_ARGUMENTS
160One或多个参数不正确。此错误值返回的重新启动管理器的功能,如果一个NULL指针或0是一个参数,需要一个非空和非零值传递。
ERROR_WRITE_FAULT
29An行动是无法读取或写入注册表。
ERROR_OUTOFMEMORY
第14A条重新启动管理器操作无法完成,因为没有足够的内存是可用。
出现ERROR_INVALID_HANDLE
6No存在重新启动管理会议提供的句柄。
ERROR_SUCCESS
0The函数执行成功和回报。
备注
在调用RmRestart功能,RM_PROCESS_INFO是由RmGetList函数返回的结构包含更新的状态信息。
重新启动管理方面的权限分开不同的用户或终端会话。一个安装程序,作为使用LocalSystem权限运行的服务无法关闭或重新启动另一个用户或终端会话的任何申请。安装人员应实现自定义的方法来关闭并重新启动应用程序,在其他会议上运行。一种方法是将开始在其他会议来执行关机并重新启动一个新的安装程序操作的过程。
当一个控制台应用程序被关闭和重新启动管理器启动后,重新启动该应用程序在一个新的控制台。
安装人员应经常重新启动应用程序和服务使用RmRestart函数即使RmShutdown函数返回一个错误,指出并不是所有的应用程序和服务可以被关闭。
该RmRestart函数不启动任何应用程序提升的权限运行。即使申请被重新启动管理器关闭。
该RmRestart函数不重新启动任何不运行的应用程序当前登录的用户。即使申请被重新启动管理器关闭。例如,RmRestart功能不重新启动的为命令,不运行运行启动的应用程序当前登录的用户。这些应用程序必须手动重新启动。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderRestartManager.h
LibraryRstrtmgr.lib
DLLRstrtmgr.dll
参见
RegisterApplicationRestart
RmCancelCurrentTask
RmShutdown
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==RmRestart Function
Restarts applications and services that have been shut down by the RmShutdown function and that have been registered to be restarted using the RegisterApplicationRestart function. This function can only be called by the primary installer that called the RmStartSession function to start the Restart Manager session.
Syntax
C++
DWORD WINAPI RmRestart(
__in DWORD dwSessionHandle,
__reserved DWORD dwRestartFlags,
__in_opt RM_WRITE_STATUS_CALLBACK fnStatus
);
Parameters
dwSessionHandle [in]
A handle to the existing Restart Manager session.
dwRestartFlags
Reserved. This parameter should be 0.
fnStatus [in, optional]
A pointer to a status message callback function that is used to communicate status while the RmRestart function is running. If NULL, no status is provided.
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_REQUEST_OUT_OF_SEQUENCE
776This error value is returned if the RmRestart function is called with a valid session handle before calling the RmShutdown function.
ERROR_FAIL_RESTART
352One or more applications could not be restarted. The RM_PROCESS_INFO structures that are returned by the RmGetList function contain updated status information.
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_CANCELLED
1223This error value is returned by the RmRestart function when the request to cancel an operation is successful.
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_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.
ERROR_SUCCESS
0The function succeeds and returns.

Remarks
After calling the RmRestart function, the RM_PROCESS_INFO structures that are returned by the RmGetList function contain updated status information.
The Restart Manager respects the privileges that separate different user or terminal sessions. An installer that is running as a service with LocalSystem privileges cannot shut down or restart any applications in another user or terminal session. Installers should implement custom methods to shut down and restart applications that are running in other sessions. One method would be to start a new installer process in the other session to perform shutdown and restart operations.
When a console application is shut down and restarted by Restart Manager, the application is restarted in a new console.
Installers should always restart application and services using the RmRestart function even when the RmShutdown function returns an error indicating that not all applications and services could be shut down.
The RmRestart function does not restart any applications that run with elevated privileges. Even if the application was shutdown by Restart Manager.
The RmRestart function does not restart any applications that do not run as the currently-logged on user. Even if the application was shutdown by Restart Manager. For example, the RmRestart function does not restart applications started with the Run As command that do not run as the currently-logged on user. These applications must be manually restarted.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderRestartManager.h
LibraryRstrtmgr.lib
DLLRstrtmgr.dll
See Also
RegisterApplicationRestart
RmCancelCurrentTask
RmShutdown
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa373665(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:35