RmCancelCurrentTask function (restartmanager.h)

Cancels the current RmShutdown or RmRestart operation. This function must be called from the application that has started the session by calling the RmStartSession function.

Syntax

DWORD RmCancelCurrentTask(
  [in] DWORD dwSessionHandle
);

Parameters

[in] dwSessionHandle

A handle to an existing session.

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.

Value Meaning
ERROR_SUCCESS
0
A cancellation of the current operation is requested.
ERROR_BAD_ARGUMENTS
160
One 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_OUTOFMEMORY
14
A Restart Manager operation could not complete because not enough memory was available.
ERROR_INVALID_HANDLE
6
No Restart Manager session exists for the handle supplied.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header restartmanager.h
Library Rstrtmgr.lib
DLL Rstrtmgr.dll

See also

RmRestart

RmShutdown