Platform SDK: Removable Storage Manager

CancelNtmsLibraryRequest

The CancelNtmsLibraryRequest function cancels outstanding RSM requests, such as calls to the CleanNtmsDrive function. If the library is busy, RSM queues the CancelNtmsLibraryRequest function and returns success.

DWORD WINAPI CancelNtmsLibraryRequest(
  HANDLE hSession,
  LPNTMS_GUID lpRequestId
);

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpRequestId
Specifies the RSM request object ID. To get a list of the existing library requests (or work items) to cancel, see the EnumerateNtmsObject function.

Return Values

Value Meaning
ERROR_ACCESS_DENIED Only an administrator of the RSM server can cancel library requests.
ERROR_OBJECT_NOT_FOUND The library request object ID was not found. This error occurs if the request is completed prior to issuing the cancel or when an invalid request ID is specified.
ERROR_SUCCESS The library request has been queued for cancellation.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Ntmsapi.h.
  Library: Use Ntmsapi.lib.

See Also

Library Control Functions, EnumerateNtmsObject