NTMS_OBJECTINFORMATIONW structure (ntmsapi.h)

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

The NTMS_OBJECTINFORMATION structure defines the properties that an application can get and set for RSM devices, media and system controls (such as libraries, drives, media, operator requests). This is the common structure of objects in the RSM database.

Syntax

typedef struct _NTMS_OBJECTINFORMATIONW {
  DWORD      dwSize;
  DWORD      dwType;
  SYSTEMTIME Created;
  SYSTEMTIME Modified;
  NTMS_GUID  ObjectGuid;
  BOOL       Enabled;
  DWORD      dwOperationalState;
  WCHAR      szName[NTMS_OBJECTNAME_LENGTH];
  WCHAR      szDescription[NTMS_DESCRIPTION_LENGTH];
#if ...
  union {
    NTMS_DRIVEINFORMATIONW       Drive;
    NTMS_DRIVETYPEINFORMATIONW   DriveType;
    NTMS_LIBRARYINFORMATION      Library;
    NTMS_CHANGERINFORMATIONW     Changer;
    NTMS_CHANGERTYPEINFORMATIONW ChangerType;
    NTMS_STORAGESLOTINFORMATION  StorageSlot;
    NTMS_IEDOORINFORMATION       IEDoor;
    NTMS_IEPORTINFORMATION       IEPort;
    NTMS_PMIDINFORMATIONW        PhysicalMedia;
    NTMS_LMIDINFORMATION         LogicalMedia;
    NTMS_PARTITIONINFORMATIONW   Partition;
    NTMS_MEDIAPOOLINFORMATION    MediaPool;
    NTMS_MEDIATYPEINFORMATION    MediaType;
    NTMS_LIBREQUESTINFORMATIONW  LibRequest;
    NTMS_OPREQUESTINFORMATIONW   OpRequest;
    NTMS_COMPUTERINFORMATION     Computer;
  } Info;
#else
  union {
    NTMS_DRIVEINFORMATIONW       Drive;
    NTMS_DRIVETYPEINFORMATIONW   DriveType;
    NTMS_LIBRARYINFORMATION      Library;
    NTMS_CHANGERINFORMATIONW     Changer;
    NTMS_CHANGERTYPEINFORMATIONW ChangerType;
    NTMS_STORAGESLOTINFORMATION  StorageSlot;
    NTMS_IEDOORINFORMATION       IEDoor;
    NTMS_IEPORTINFORMATION       IEPort;
    NTMS_PMIDINFORMATIONW        PhysicalMedia;
    NTMS_LMIDINFORMATION         LogicalMedia;
    NTMS_PARTITIONINFORMATIONW   Partition;
    NTMS_MEDIAPOOLINFORMATION    MediaPool;
    NTMS_MEDIATYPEINFORMATION    MediaType;
    NTMS_LIBREQUESTINFORMATIONW  LibRequest;
    NTMS_OPREQUESTINFORMATIONW   OpRequest;
    NTMS_COMPUTERINFORMATION     Computer;
  } Info;
#endif
} NTMS_OBJECTINFORMATIONW, *LPNTMS_OBJECTINFORMATIONW;

Members

dwSize

Type: DWORD

Size of the information structure, in bytes. This member must be set to the correct size of the structure prior to using either the GetNtmsObjectInformationfunction or the SetNtmsObjectInformation function.

dwType

Type: DWORD

Type of device or system control for which to get/set information. This member must be set to one of the following values.

Value Meaning
NTMS_CHANGER
A changer object represents the robotic element of a library unit. The Info member is a pointer to an NTMS_CHANGERINFORMATION structure.
NTMS_CHANGER_TYPE
A changer type object is created for each unique changer device type attached to a system. The Info member is a pointer to an NTMS_CHANGERTYPEINFORMATION structure.
NTMS_COMPUTER
The current computer object. There is no structure for the computer object. The Info member is a pointer to an NTMS_COMPUTERINFORMATION structure.
NTMS_DRIVE
A drive object represents a tape drive or disk drive. The Info member is a pointer to an NTMS_DRIVEINFORMATION structure.
NTMS_DRIVE_TYPE
A drive type object is created for each unique drive device type attached to a system. The Info member is a pointer to an NTMS_DRIVETYPEINFORMATION structure.
NTMS_IEDOOR
An NTMS_IEDOOR object represents the door-access mechanism of a library unit. The Info member is a pointer to an NTMS_IEDOORINFORMATION structure.
NTMS_IEPORT
An NTMS_IEPORT object represents the insert/eject port of a library unit. The Info member is a pointer to an NTMS_IEPORTINFORMATION structure.
NTMS_LIBRARY
A library object represents an online or offline library. The Info member is a pointer to an NTMS_LIBRARYINFORMATION structure.
NTMS_LIBREQUEST
A library request object is created for each request for a library to perform an action. A list of library requests is maintained by RSM as a queue of work to be performed. The Info member is a pointer to an NTMS_LIBREQUESTINFORMATION structure.
NTMS_LOGICAL_MEDIA
The primary handle used by applications to access the specified medium. In the case of multi-sided media, each side is treated as an individual piece of physical media. The Info member is a pointer to an NTMS_LMIDINFORMATION structure.
NTMS_MEDIA_POOL
A media pool is a logical grouping of media. All media in a media pool must be the same media type. The Info member is a pointer to an NTMS_MEDIAPOOLINFORMATION structure.
NTMS_MEDIA_TYPE
A media type object is created for each unique media type in a system. The Info member is a pointer to an NTMS_MEDIATYPEINFORMATION structure.
NTMS_OPREQUEST
An operator request object represents an RSM request for a user to get the information. The Info member is a pointer to an NTMS_OPREQUESTINFORMATION structure.
NTMS_PARTITION
A side object represents a side of a piece of physical media. The Info member is a pointer to an NTMS_PARTITIONINFORMATION structure.
NTMS_PHYSICAL_MEDIA
A physical media object represents a magnetic tape or removable disk. A piece of physical media can contain one or more sides. The Info member is a pointer to an NTMS_PMIDINFORMATION structure.
NTMS_STORAGESLOT
A storage slot object represents one of the slots that can hold the specified medium in a library. The Info member is a pointer to an NTMS_STORAGESLOTINFORMATION structure.

Created

Type: SYSTEMTIME

Date/time stamp when the object was created.

Modified

Type: SYSTEMTIME

Date/time stamp when the object was modified.

ObjectGuid

Type: NTMS_GUID

GUID of the object.

Enabled

Type: BOOL

Indicates whether the device or system control object is enabled.

dwOperationalState

Type: DWORD

Defines the current operational state of the object. This can be one of the following values.

Value Meaning
NTMS_NOT_PRESENT
This device or object is not currently present.
NTMS_READY
This device or object is available and ready.
NTMS_NEEDS_SERVICE
This device or object has failed and needs service.

szName

Type: TCHAR[NTMS_OBJECTNAME_LENGTH]

Name of the media, device, or system control object. Media pool and logical media names can be changed using the SetNtmsObjectInformation function. All other object names are read-only.

szDescription

Type: TCHAR[NTMS_DESCRIPTION_LENGTH]

Description of the device or system control object. The description of device and system control objects can be changed using the SetNtmsObjectInformation function. (Writable for all objects)

Info

Device or system control object-specific information. The format of this information depends on the dwType member.

Info.#3839268991.Drive

Info.#3839268991.DriveType

Info.#3839268991.Library

Info.#3839268991.Changer

Info.#3839268991.ChangerType

Info.#3839268991.StorageSlot

Info.#3839268991.IEDoor

Info.#3839268991.IEPort

Info.#3839268991.PhysicalMedia

Info.#3839268991.LogicalMedia

Info.#3839268991.Partition

Info.#3839268991.MediaPool

Info.#3839268991.MediaType

Info.#3839268991.LibRequest

Info.#3839268991.OpRequest

Info.#3839268991.Computer

Info.#3839268992.Drive

Info.#3839268992.DriveType

Info.#3839268992.Library

Info.#3839268992.Changer

Info.#3839268992.ChangerType

Info.#3839268992.StorageSlot

Info.#3839268992.IEDoor

Info.#3839268992.IEPort

Info.#3839268992.PhysicalMedia

Info.#3839268992.LogicalMedia

Info.#3839268992.Partition

Info.#3839268992.MediaPool

Info.#3839268992.MediaType

Info.#3839268992.LibRequest

Info.#3839268992.OpRequest

Info.#3839268992.Computer

Remarks

All members of the NTMS_OBJECTINFORMATION structure are read-only at the RSM function-level unless specified as WRITABLE in the definition of the member.

Note

The ntmsapi.h header defines NTMS_OBJECTINFORMATION as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header ntmsapi.h

See also

GetNtmsObjectInformation

SetNtmsObjectInformation