// ntddchgr.h
typedef struct _CHANGER_ELEMENT_STATUS_EX {
CHANGER_ELEMENT Element;
CHANGER_ELEMENT SrcElementAddress;
ULONG Flags;
ULONG ExceptionCode;
UCHAR TargetId;
UCHAR Lun;
USHORT Reserved;
UCHAR PrimaryVolumeID[MAX_VOLUME_ID_SIZE];
UCHAR AlternateVolumeID[MAX_VOLUME_ID_SIZE];
UCHAR VendorIdentification[VENDOR_ID_LENGTH];
UCHAR ProductIdentification[PRODUCT_ID_LENGTH];
UCHAR SerialNumber[SERIAL_NUMBER_LENGTH];
} CHANGER_ELEMENT_STATUS_EX, *PCHANGER_ELEMENT_STATUS_EX;
View the official Windows Driver Kit DDI reference// winioctl.h
typedef struct _CHANGER_ELEMENT_STATUS_EX {
CHANGER_ELEMENT Element;
CHANGER_ELEMENT SrcElementAddress;
DWORD Flags;
DWORD ExceptionCode;
BYTE TargetId;
BYTE Lun;
WORD Reserved;
BYTE PrimaryVolumeID[MAX_VOLUME_ID_SIZE];
BYTE AlternateVolumeID[MAX_VOLUME_ID_SIZE];
BYTE VendorIdentification[VENDOR_ID_LENGTH];
BYTE ProductIdentification[PRODUCT_ID_LENGTH];
BYTE SerialNumber[SERIAL_NUMBER_LENGTH];
} CHANGER_ELEMENT_STATUS_EX, *PCHANGER_ELEMENT_STATUS_EX;
View the official Win32 API referenceNo description available.
The ChangerGetElementStatus routine returns status information in this structure.
ElementSpecifies the element of type CHANGER_ELEMENT to which this structure refers.
SrcElementAddressSpecifies the element of type CHANGER_ELEMENT from which the media currently in this element was most recently moved. This member is valid only if ELEMENT_STATUS_SVALID is also set in Flags. This value must be a zero-based offset from the device-unique value.
FlagsIndicates the status of the element, which can be one or more of the following values.
The element contains a piece of media. This flag is valid if ElementType in the Element member is ChangerDrive, ChangerSlot, or ChangerTransport. If ElementType is ChangerIEPort, this flag is valid only if CHANGER_REPORT_IEPORT_STATE is also set in Features0 of GET_CHANGER_PARAMETERS.
The media in this element was placed there by an operator. This flag is valid only if ElementType in the Element member is ChangerIEPort.
The element is in an abnormal state. Check the ExceptionCode member for more information.
The changer's transport element can access the piece of media in this element. The miniclass driver clears this flag to indicate that the media is not accessible for one of the following reasons: If ElementType in the Element member is ChangerSlot, the slot is not present in the changer (for example, the magazine containing the slot has been physically removed). If ElementType is ChangerDrive, the drive is broken or has been removed. If ElementType is ChangerIEPort, the IEport is extended.
The element supports export of media through the changer's IEport.
The element supports import of media through the changer's IEport.
The device number in the Lun member is valid. This flag is valid only if ElementType in the Element member is ChangerDrive.
The SCSI target ID in the TargetID member is valid. This flag is valid only if ElementType in the Element member is ChangerDrive.
The drive at the address indicated by Lun and TargetID is on a different SCSI bus than the changer itself.
The serial number in the SerialNumber member is valid.
The media in the element was flipped. This flag is valid only if the ELEMENT_STATUS_SVALID flag is also set.
The SourceElement member and ELEMENT_STATUS_INVERT flag are both valid.
Primary volume information in the PrimaryVolumeID member is valid.
Alternate volume information in the AlternateVolumeID member is valid.
ExceptionCodeIndicates that the element is in an abnormal state. This member is valid only if ELEMENT_STATUS_EXCEPT is set in Flags. ExceptionCode can be set to one of the following values.
The changer's bar code reader could not read the bar code label on the piece of media in this element, because the media is missing, damaged, improperly positioned, or upside down.
The label might be invalid due to a unit attention condition.
The slot at this element address is currently not installed in the changer. A miniclass driver sets this code for each slot in a removable magazine to indicate that the magazine has been removed.
The drive at this element address is absent. If a changer can continue to operate without the drive, its miniclass driver sets ERROR_DRIVE_NOT_INSTALLED for the drive.
The drive at this element address has a tray that must be extended to load or remove media, and the tray is not extending as required.
Unknown error condition.
TargetIdSpecifies the SCSI target ID of the drive at this element address for a SCSI changer. This member is valid only if ElementType in the Element member is ChangerDrive and ELEMENT_STATUS_ID_VALID is set in Flags.
LunSpecifies the SCSI device number of the drive at this element address. This member is valid only if ElementType in the Element member is ChangerDrive and ELEMENT_STATUS_LUN_VALID is set in Flags.
ReservedReserved for future use. The value of this member must be zero.
PrimaryVolumeIDSpecifies the primary volume identifier for the media. If the changer supports a bar code reader and the reader is installed (as indicated by CHANGER_BAR_CODE_SCANNER_INSTALLED in Features0 of GET_CHANGER_PARAMETERS), the miniclass driver must set PrimaryVolumeID to the bar code of the media. If the changer does not support a bar code reader, the miniclass driver should set PrimaryVolumeID to the value previously assigned to the media using the ChangerQueryVolumeTags routine with an ASSERT_PRIMARY or REPLACE_PRIMARY action. This member is valid only if ELEMENT_STATUS_PVOLTAG is also set in Flags. If the volume identifier is missing or unreadable, the miniclass driver should clear this flag and set the appropriate error status. This identifier must be no larger than MAX_VOLUME_ID_SIZE bytes.
AlternateVolumeIDSpecifies alternate volume identification for the media. This member is valid for two-sided media only, and pertains to the ID of the inverted side. It never represents a bar code. The miniclass driver must set AlternateVolumeID to the value previously assigned to the media using the ChangerQueryVolumeTags routine with an ASSERT_ALTERNATE or REPLACE_ALTERNATE action. The identifier must be no larger than MAX_VOLUME_ID_SIZE bytes and is valid only if ELEMENT_STATUS_AVOLTAG is also set in Flags.
VendorIdentificationContains the vendor ID. This identifier must be no larger than VENDOR_ID_LENGTH bytes.
ProductIdentificationContains the product ID. This identifier must be no larger than PRODUCT_ID_LENGTH bytes.
SerialNumberContains the serial number. This identifier must be no larger than SERIAL_NUMBER_LENGTH bytes.
The ChangerGetElementStatus routine returns status information in this structure if vendor, product, or serial number information is needed. Otherwise, ChangerGetElementStatus returns status information in the CHANGER_ELEMENT_STATUS structure.
IOCTL_CHANGER_GET_ELEMENT_STATUS
Represents the status of the specified element.
ElementA CHANGER_ELEMENT structure that represents the element to which this structure refers.
SrcElementAddressA CHANGER_ELEMENT structure that represents the element from which the media currently in this element was most recently moved.
This member is valid only if the Flags member includes ELEMENT_STATUS_SVALID.
FlagsThe element status. This member can be one or more of the following values.
| Value | Meaning |
|---|---|
| ELEMENT_STATUS_ACCESS 0x00000008 |
The changer's transport element can access the piece of media in this element. The media is not accessible in the following circumstances: (1) If the element type is ChangerSlot, the slot is not present in the changer (for example, the magazine containing the slot has been physically removed). (2) If the element type is ChangerDrive, the drive is broken or has been removed. (3) If the element type is ChangerIEPort, the changer's insert/eject port is extended. |
| ELEMENT_STATUS_AVOLTAG 0x20000000 |
Alternate volume information in the AlternateVolumeID member is valid. |
| ELEMENT_STATUS_EXCEPT 0x00000004 |
The element is in an abnormal state. Check the ExceptionCode member for more information. |
| ELEMENT_STATUS_EXENAB 0x00000010 |
The element supports export of media through the changer's insert/eject port. |
| ELEMENT_STATUS_FULL 0x00000001 |
The element contains a piece of media. Note that this value is valid only if the element type is ChangerDrive, ChangerSlot, or ChangerTransport. If the element type is ChangerIEPort, this value is valid only if the Features0 member of GET_CHANGER_PARAMETERS includes CHANGER_REPORT_IEPORT_STATE. |
| ELEMENT_STATUS_ID_VALID 0x00002000 |
The SCSI target ID in the TargetID member is valid. This value is valid only if the element type is ChangerDrive. |
| ELEMENT_STATUS_IMPEXP 0x00000002 |
The media in this element was placed there by an operator. This value is valid only if the element type is ChangerIEPort. |
| ELEMENT_STATUS_INENAB 0x00000020 |
The element supports import of media through the changer's insert/eject port. |
| ELEMENT_STATUS_INVERT 0x00400000 |
The media in the element was flipped. This value is valid only if ELEMENT_STATUS_SVALID is also included. |
| ELEMENT_STATUS_LUN_VALID 0x00001000 |
The logical unit number in the Lun member is valid. This value is valid only if the element type is ChangerDrive. |
| ELEMENT_STATUS_NOT_BUS 0x00008000 |
The drive at the address indicated by Lun and TargetID is on a different SCSI bus than the changer itself. |
| ELEMENT_STATUS_PRODUCT_DATA 0x00000040 |
The serial number in the SerialNumber member is valid. |
| ELEMENT_STATUS_PVOLTAG 0x10000000 |
Primary volume information in the PrimaryVolumeID member is valid. |
| ELEMENT_STATUS_SVALID 0x00800000 |
The SourceElement member and ELEMENT_STATUS_INVERT are both valid. |
ExceptionCodeAn exception code that indicates that the element is in an abnormal state. This member is valid only if the Flags member includes ELEMENT_STATUS_EXCEPT. This member can be one of the following values.
| Value | Meaning |
|---|---|
| ERROR_DRIVE_NOT_INSTALLED 0x00000008 |
The drive at this element address is absent. |
| ERROR_INIT_STATUS_NEEDED 0x00000011 |
An Initialize Element Status command is needed. |
| ERROR_LABEL_QUESTIONABLE 0x00000002 |
The label might be invalid due to a unit attention condition. |
| ERROR_LABEL_UNREADABLE 0x00000001 |
The changer's barcode reader could not read the bar code label on the piece of media in this element, because the media is missing, damaged, improperly positioned, or upside down. |
| ERROR_SLOT_NOT_PRESENT 0x00000004 |
The slot at this element address is currently not installed in the changer. Each slot in a removable magazine is reported not present to indicate that the magazine has been removed. |
| ERROR_TRAY_MALFUNCTION 0x00000010 |
The drive at this element address has a tray that must be extended to load or remove media, and the tray is not extending as required. |
| ERROR_UNHANDLED_ERROR 0xFFFFFFFF |
Unknown error condition. |
TargetIdFor a SCSI changer, specifies the SCSI target ID of the drive at this element address. This member is valid only if the ElementType member of the Element structure is ChangerDrive and the Flags member includes ELEMENT_STATUS_ID_VALID.
LunThe SCSI logical unit number of the drive at this element address. This member is valid only if the ElementType member of the Element structure is ChangerDrive and the Flags member includes ELEMENT_STATUS_LUN_VALID.
ReservedReserved for future use. The value of this member must be zero.
PrimaryVolumeIDThe primary volume identifier for the media. If the changer supports a barcode reader and the reader is installed (as indicated by CHANGER_BAR_CODE_SCANNER_INSTALLED in the Features0 member of GET_CHANGER_PARAMETERS), PrimaryVolumeID is the bar code of the media. If the changer does not support a barcode reader, PrimaryVolumeID is the value previously assigned to the media.
This member is valid only if the Flags member includes ELEMENT_STATUS_PVOLTAG.
If the volume identifier is missing or unreadable, this member is cleared.
AlternateVolumeIDAn alternate volume identification for the media. This member is valid for two-sided media only, and pertains to the ID of the inverted side. It never represents a bar code.
This member is valid only if the Flags member includes ELEMENT_STATUS_AVOLTAG.
VendorIdentificationThe vendor identifier.
ProductIdentificationThe product identifier.
SerialNumberThe serial number for the drive.
IOCTL_CHANGER_GET_ELEMENT_STATUS