[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]
The CancelNtmsLibraryRequest function cancels outstanding RSM requests, such as calls to the CleanNtmsDrive function. If the library is busy, RSM queues the cancellation and returns success.
DWORD CancelNtmsLibraryRequest( HANDLE hSession, LPNTMS_GUID lpRequestId );
Handle to the session returned by the OpenNtmsSession function.
Unique identifier of the library request to be canceled.
To retrieve the list of existing library requests, use the EnumerateNtmsObject function.
This function returns one of the following values.
||Only an administrator of the RSM server can cancel library requests. This error is also returned if the request is currently being handled and cannot be deleted.|
||The session handle is missing or is not valid.|
||There was an allocation failure during processing.|
||The library request object ID was not found. This error occurs if the request is completed prior to issuing the cancel or when a request ID that is not valid is specified.|
||The library request has been queued for cancellation.|
|Windows version||Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]|