CancelNtmsOperatorRequest function (ntmsapi.h)

[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]

The CancelNtmsOperatorRequest function cancels the specified RSM operator request.

Syntax

DWORD CancelNtmsOperatorRequest(
  [in] HANDLE      hSession,
  [in] LPNTMS_GUID lpRequestId
);

Parameters

[in] hSession

Handle to the session returned by the OpenNtmsSession function.

[in] lpRequestId

Unique identifier of the operator request to be canceled.

To retrieve the list of existing operator requests, use the EnumerateNtmsObject function. You can also use the identifier returned by the SubmitNtmsOperatorRequest function.

Return value

This function returns one of the following values.

Value Meaning
ERROR_ACCESS_DENIED
The user that tried to execute this function does not have administrator privileges. Only an administrator of the RSM server can cancel operator requests.
ERROR_INVALID_HANDLE
The session handle is missing or is not valid.
ERROR_INVALID_PARAMETER
The request identifier is missing.
ERROR_INVALID_STATE
The request has already been completed or canceled.
ERROR_OBJECT_NOT_FOUND
The operator request object ID was not found. This error can occur if the request ID is not valid.
ERROR_SUCCESS
The operator request has been canceled.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header ntmsapi.h
Library Ntmsapi.lib
DLL Ntmsapi.dll

See also

Operator Request Functions

SatisfyNtmsOperatorRequest

SubmitNtmsOperatorRequest