Partager via


SubmitNtmsOperatorRequest Function

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

The SubmitNtmsOperatorRequest function submits an RSM operator request.

Syntax

DWORD SubmitNtmsOperatorRequest(
  __in   HANDLE hSession,
  __in   DWORD dwRequest,
  __in   LPCTSTR lpMessage,
  __in   LPNTMS_GUID lpArg1Id,
  __in   LPNTMS_GUID lpArg2Id,
  __out  LPNTMS_GUID lpRequestId
);

Parameters

  • hSession [in]
    Handle to the session returned by the OpenNtmsSession function.

  • dwRequest [in]
    Type of operator request. This parameter can be one of the following values.

    Value Meaning
    NTMS_OPREQ_CLEANER

    RSM sends an operator request to insert a cleaner when a clean operation is queued and no cleaner is available to the drive. The lpArg1Id parameter can be either a library or slot identifier.

    Requires NTMS_CONTROL_ACCESS to the library.

    Windows XP/2000:  No access rights are required.
    NTMS_OPREQ_DEVICESERVICE

    An application or RSM sends an operator request for drive service when a changer device or drive is experiencing problems. The lpArg1Id parameter specifies the device that needs service. This parameter can be an iedoor, library, physical media, or drive identifier.

    Requires NTMS_CONTROL_ACCESS to the library.

    Windows XP/2000:  No access rights are required.
    NTMS_OPREQ_MESSAGE

    Application message only.

    Requires NTMS_USE_ACCESS to the computer.

    Windows XP/2000:  No access rights are required.
    NTMS_OPREQ_MOVEMEDIA

    An application or RSM sends an operator request to move media from one library to another for a mount of offline media or to eject existing media to the offline library. The lpArg1Id parameter specifies the piece of physical media that must be moved and the lpArg2Id parameter specifies the target library.

    Requires NTMS_CONTROL_ACCESS to the media pool.

    Windows XP/2000:  No access rights are required.
    NTMS_OPREQ_NEWMEDIA

    An application or RSM sends an operator request for new media when no media is available. The lpArg1Id parameter specifies the media pool object and the lpArg2Id parameter is the optional library identifier to which to add the new medium.

    Requires NTMS_CONTROL_ACCESS to the media pool.

    Windows XP/2000:  No access rights are required.

     

  • lpMessage [in]
    Optional message string to be sent to the user.

  • lpArg1Id [in]
    Object identifier for the operator request. Refer to the descriptions of the values in the dwRequest parameter for a description of what type of object must be passed for this parameter.

  • lpArg2Id [in]
    Object identifier for the operator request. Refer to the descriptions of the values in the dwRequest parameter for details on what type of object must be passed for this parameter.

  • lpRequestId [out]
    Pointer to a buffer that receives the identifier of the operator request that was created.

Return Value

This function returns one of the following values.

Value Meaning
ERROR_ACCESS_DENIED

Access to one or more RSM objects is denied.

ERROR_DATABASE_FAILURE

The database query or update failed.

ERROR_INVALID_HANDLE

The value specified in the hSession parameter is NULL or is not valid.

ERROR_INVALID_PARAMETER

One of the parameter values is not valid.

ERROR_NOT_CONNECTED

Unable to connect to the RSM service.

ERROR_OBJECT_NOT_FOUND

Unable to find the source or destination object.

ERROR_SUCCESS

The function was successful.

 

Remarks

The SubmitNtmsOperatorRequest function submits an operator request and returns the status of the request (Satisfied or Canceled) or times out (if the operator does not act upon the request). Operator requests are used to request media, to request that the specified medium be moved from one library to another, or to request RSM device service.

The NTMS_OPEREQ_MESSAGE value (in the dwRequest parameter) is the request type most often used by applications. RSM cannot use NTMS_OPEREQ_MESSAGE. RSM uses the other request types as needed.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

End of client support

Windows Vista

End of server support

Windows Server 2008

Header

Ntmsapi.h

Library

Ntmsapi.lib

DLL

Ntmsapi.dll

Unicode and ANSI names

SubmitNtmsOperatorRequestW (Unicode) and SubmitNtmsOperatorRequestA (ANSI)

See Also

Operator Request Functions

AllocateNtmsMedia

MountNtmsMedia

CancelNtmsOperatorRequest

SatisfyNtmsOperatorRequest

WaitForNtmsOperatorRequest

 

 

Send comments about this topic to Microsoft

Build date: 6/9/2011