Export (0) Print
Expand All

RmCancelCurrentTask function

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 WINAPI RmCancelCurrentTask(
  _In_  DWORD dwSessionHandle
);

Parameters

dwSessionHandle [in]

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.

ValueMeaning
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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

RestartManager.h

Library

Rstrtmgr.lib

DLL

Rstrtmgr.dll

See also

RmRestart
RmShutdown

 

 

Community Additions

ADD
Show:
© 2014 Microsoft