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 GetNtmsObjectInformation function 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 |
---|---|
|
A changer object represents the robotic element of a library unit. The Info member is a pointer to an NTMS_CHANGERINFORMATION structure. |
|
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. |
|
The current computer object. There is no structure for the computer object. The Info member is a pointer to an NTMS_COMPUTERINFORMATION structure. |
|
A drive object represents a tape drive or disk drive. The Info member is a pointer to an NTMS_DRIVEINFORMATION structure. |
|
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. |
|
An NTMS_IEDOOR object represents the door-access mechanism of a library unit. The Info member is a pointer to an NTMS_IEDOORINFORMATION structure. |
|
An NTMS_IEPORT object represents the insert/eject port of a library unit. The Info member is a pointer to an NTMS_IEPORTINFORMATION structure. |
|
A library object represents an online or offline library. The Info member is a pointer to an NTMS_LIBRARYINFORMATION structure. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
A side object represents a side of a piece of physical media. The Info member is a pointer to an NTMS_PARTITIONINFORMATION structure. |
|
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. |
|
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.
szName[NTMS_OBJECTNAME_LENGTH]
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[NTMS_DESCRIPTION_LENGTH]
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.Drive
Type: NTMS_DRIVEINFORMATION This format is used if the dwType value is NTMS_DRIVE.
Info.DriveType
Type: NTMS_DRIVETYPEINFORMATION This format is used if the dwType value is NTMS_DRIVE_TYPE.
Info.Library
Type: NTMS_LIBRARYINFORMATION This format is used if the dwType value is NTMS_LIBRARY.
Info.Changer
Type: NTMS_CHANGERINFORMATION This format is used if the dwType value is NTMS_CHANGER.
Info.ChangerType
Type: NTMS_CHANGERTYPEINFORMATION This format is used if the dwType value is NTMS_CHANGER_TYPE.
Info.StorageSlot
Type: NTMS_STORAGESLOTINFORMATION This format is used if the dwType value is NTMS_STORAGESLOT.
Info.IEDoor
Type: NTMS_IEDOORINFORMATION This format is used if the dwType value is NTMS_IEDOOR.
Info.IEPort
Type: NTMS_IEPORTINFORMATION This format is used if the dwType value is NTMS_IEPORT.
Info.PhysicalMedia
Type: NTMS_PMIDINFORMATION This format is used if the dwType value is NTMS_PHYSICAL_MEDIA.
Info.LogicalMedia
Type: NTMS_LMIDINFORMATION This format is used if the dwType value is NTMS_LOGICAL_MEDIA.
Info.Partition
Type: NTMS_PARTITIONINFORMATION This format is used if the dwType value is NTMS_PARTITION.
Info.MediaPool
Type: NTMS_MEDIAPOOLINFORMATION This format is used if the dwType value is NTMS_MEDIA_POOL.
Info.MediaType
Type: NTMS_MEDIATYPEINFORMATION This format is used if the dwType value is NTMS_MEDIA_TYPE.
Info.LibRequest
Type: NTMS_LIBREQUESTINFORMATION This format is used if the dwType value is NTMS_LIBREQUEST.
Info.OpRequest
Type: NTMS_OPREQUESTINFORMATION This format is used if the dwType value is NTMS_OPREQUEST.
Info.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 that 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 is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | ntmsapi.h |