Platform SDK: Removable Storage Manager

WaitForNtmsOperatorRequest

The WaitForNtmsOperatorRequest function waits for the specified RSM operator request.

DWORD WINAPI WaitForNtmsOperatorRequest(
  HANDLE hSession,
  LPNTMS_GUID lpRequestId,
  DWORD dwTimeout
);

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.
lpRequestId
Specifies the operator request identifier created by the SubmitNtmsOperatorRequest function.
dwTimeout
Specifies the number of milliseconds to wait. To check for an operator request, pass a time-out value of zero. If you specify a value of INFINITE, this function does not time-out.

Return Values

Value Meaning
ERROR_ACCESS_DENIED Access to one or more RSM objects is denied.
ERROR_CANCELLED The operator request was canceled by an administrator.
ERROR_INVALID_HANDLE The value specified in the hSession parameter is NULL or invalid.
ERROR_INVALID_PARAMETER Invalid parameters were passed to the function.
ERROR_NOT_CONNECTED Unable to connect to the RSM service.
ERROR_OBJECT_NOT_FOUND Unable to find the operator request object. Object requests are flushed from the database. Application should call a function like AllocateNtmsMedia if RSM returns this error.
ERROR_SUCCESS The function was successful.
ERROR_TIMEOUT The time specified in the dwTimeout parameter elapsed before the completion of the operator request.

Remarks

Operator requests specified with the WaitForNtmsOperatorRequest function are used to request media, to request that the medium be moved from one library to another, or to request RSM device service.

An application uses WaitForNtmsOperatorRequest to wait for resolution of an operator request. The request can be satisfied, rejected, deleted, or timed out.

Typically, applications use the SubmitNtmsOperatorRequest function to submit operator requests and use the WaitForNtmsOperatorRequest function to wait for their resolution.

Requirements

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

See Also

Operator Request Functions, CancelNtmsOperatorRequest, SatisfyNtmsOperatorRequest, SubmitNtmsOperatorRequest