IdentifyNtmsSlot Function

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

The IdentifyNtmsSlot function identifies the media in the specified slot in a library. The command returns when the identification is complete.

Syntax

DWORD IdentifyNtmsSlot(
  __in  HANDLE hSession,
  __in  LPNTMS_GUID lpSlotID,
  __in  DWORD dwOption
);

Parameters

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

  • lpSlotID [in]
    Unique identifier of the slot object to be identified.

  • dwOption [in]
    This parameter can be one of the following values.

    Value Meaning
    NTMS_DISMOUNT_DEFERRED

    Leave the media in the drive after the media identification is complete, as if it had been dismounted with the "deferred" option.

    NTMS_DISMOUNT_IMMEDIATE

    Dismount the media in the drive after the media identification is complete.

     

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_INVALID_HANDLE

The value specified in the hSession parameter is not valid.

ERROR_INVALID_PARAMETER

The slot ID or the dwOption is not valid.

ERROR_SUCCESS

The function was successful.

 

Remarks

If the slot is empty the function returns ERROR_SUCCESS, but no new media records appear.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

End of client support

Windows Vista

End of server support

Windows Server 2008

Header

Ntmsapi.h

Library

Ntmsapi.lib

DLL

Ntmsapi.dll

See Also

Library Control Functions

InventoryNtmsLibrary

 

 

Send comments about this topic to Microsoft

Build date: 6/9/2011