📄 ntddchgr.h
字号:
CHANGER_ELEMENT Element;
//
// Address of the element from which the media was originally moved.
// Valid if ELEMENT_STATUS_SVALID bit of Flags ULONG is set.
// Needs to be converted to a zero-based offset from the device-unique value.
//
CHANGER_ELEMENT SrcElementAddress;
//
// See below.
//
ULONG Flags;
//
// See below for possible values.
//
ULONG ExceptionCode;
//
// Scsi Target Id of this element.
// Valid only if ELEMENT_STATUS_ID_VALID is set in Flags.
//
UCHAR TargetId;
//
// LogicalUnitNumber of this element.
// Valid only if ELEMENT_STATUS_LUN_VALID is set in Flags.
//
UCHAR Lun;
USHORT Reserved;
//
// Primary volume identification for the media.
// Valid only if ELEMENT_STATUS_PVOLTAG bit is set in Flags.
//
UCHAR PrimaryVolumeID[MAX_VOLUME_ID_SIZE];
//
// Alternate volume identification for the media.
// Valid for two-sided media only, and pertains to the id. of the inverted side.
// Valid only if ELEMENT_STATUS_AVOLTAG bit is set in Flags.
//
UCHAR AlternateVolumeID[MAX_VOLUME_ID_SIZE];
} CHANGER_ELEMENT_STATUS, *PCHANGER_ELEMENT_STATUS;
//
// Output buffer. This is same as CHANGER_ELEMENT_STATUS with
// the addition of product info fields. New applications should
// use this struct instead of the older CHANGER_ELEMENT_STATUS
//
typedef struct _CHANGER_ELEMENT_STATUS_EX {
//
// Element to which this structure refers.
//
CHANGER_ELEMENT Element;
//
// Address of the element from which the media was originally moved.
// Valid if ELEMENT_STATUS_SVALID bit of Flags ULONG is set.
// Needs to be converted to a zero-based offset from the device-unique value.
//
CHANGER_ELEMENT SrcElementAddress;
//
// See below.
//
ULONG Flags;
//
// See below for possible values.
//
ULONG ExceptionCode;
//
// Scsi Target Id of this element.
// Valid only if ELEMENT_STATUS_ID_VALID is set in Flags.
//
UCHAR TargetId;
//
// LogicalUnitNumber of this element.
// Valid only if ELEMENT_STATUS_LUN_VALID is set in Flags.
//
UCHAR Lun;
USHORT Reserved;
//
// Primary volume identification for the media.
// Valid only if ELEMENT_STATUS_PVOLTAG bit is set in Flags.
//
UCHAR PrimaryVolumeID[MAX_VOLUME_ID_SIZE];
//
// Alternate volume identification for the media.
// Valid for two-sided media only, and pertains to the id. of the inverted side.
// Valid only if ELEMENT_STATUS_AVOLTAG bit is set in Flags.
//
UCHAR AlternateVolumeID[MAX_VOLUME_ID_SIZE];
//
// Vendor ID
//
UCHAR VendorIdentification[VENDOR_ID_LENGTH];
//
// Product ID
//
UCHAR ProductIdentification[PRODUCT_ID_LENGTH];
//
// Serial number
//
UCHAR SerialNumber[SERIAL_NUMBER_LENGTH];
} CHANGER_ELEMENT_STATUS_EX, *PCHANGER_ELEMENT_STATUS_EX;
//
// Possible flag values
//
#define ELEMENT_STATUS_FULL 0x00000001 // Element contains a unit of media.
#define ELEMENT_STATUS_IMPEXP 0x00000002 // Media in i/e port was placed there by an operator.
#define ELEMENT_STATUS_EXCEPT 0x00000004 // Element is in an abnormal state; check ExceptionCode field for more information.
#define ELEMENT_STATUS_ACCESS 0x00000008 // Access to the i/e port from the medium changer is allowed.
#define ELEMENT_STATUS_EXENAB 0x00000010 // Export of media is supported.
#define ELEMENT_STATUS_INENAB 0x00000020 // Import of media is supported.
#define ELEMENT_STATUS_PRODUCT_DATA 0x00000040 // Serial number valid for the drive
#define ELEMENT_STATUS_LUN_VALID 0x00001000 // Lun information is valid.
#define ELEMENT_STATUS_ID_VALID 0x00002000 // SCSI Id information is valid.
#define ELEMENT_STATUS_NOT_BUS 0x00008000 // Lun and SCSI Id fields are not on same bus as medium changer.
#define ELEMENT_STATUS_INVERT 0x00400000 // Media in element was inverted (valid only if ELEMENT_STATUS_SVALID bit is set)
#define ELEMENT_STATUS_SVALID 0x00800000 // SourceElementAddress field and ELEMENT_STATUS_INVERT bit are valid.
#define ELEMENT_STATUS_PVOLTAG 0x10000000 // Primary volume information is valid.
#define ELEMENT_STATUS_AVOLTAG 0x20000000 // Alternate volume information is valid.
//
// ExceptionCode values.
//
#define ERROR_LABEL_UNREADABLE 0x00000001 // Bar code scanner could not read bar code label.
#define ERROR_LABEL_QUESTIONABLE 0x00000002 // Label could be invalid due to unit attention condition.
#define ERROR_SLOT_NOT_PRESENT 0x00000004 // Slot is currently not addressable in the device.
#define ERROR_DRIVE_NOT_INSTALLED 0x00000008 // Drive is not installed.
#define ERROR_TRAY_MALFUNCTION 0x00000010 // Media tray is malfunctioning/broken.
#define ERROR_INIT_STATUS_NEEDED 0x00000011 // An Initialize Element Status command is needed.
#define ERROR_UNHANDLED_ERROR 0xFFFFFFFF // Unknown error condition
//
// Definitions for IOCTL_CHANGER_INITIALIZE_ELEMENT_STATUS
//
typedef struct _CHANGER_INITIALIZE_ELEMENT_STATUS {
//
// List describing the elements and range on which to initialize.
//
CHANGER_ELEMENT_LIST ElementList;
//
// Indicates whether a bar code scan should be used. Only applicable if
// CHANGER_BAR_CODE_SCANNER_INSTALLED is set in Features0 of CHANGER_GET_PARAMETERS.
//
BOOLEAN BarCodeScan;
} CHANGER_INITIALIZE_ELEMENT_STATUS, *PCHANGER_INITIALIZE_ELEMENT_STATUS;
//
// Definitions for IOCTL_CHANGER_SET_POSITION
//
typedef struct _CHANGER_SET_POSITION {
//
// Indicates which transport to move.
//
CHANGER_ELEMENT Transport;
//
// Indicates the final destination of the transport.
//
CHANGER_ELEMENT Destination;
//
// Indicates whether the media currently carried by Transport, should be flipped.
//
BOOLEAN Flip;
} CHANGER_SET_POSITION, *PCHANGER_SET_POSITION;
//
// Definitions for IOCTL_CHANGER_EXCHANGE_MEDIUM
//
typedef struct _CHANGER_EXCHANGE_MEDIUM {
//
// Indicates which transport to use for the exchange operation.
//
CHANGER_ELEMENT Transport;
//
// Indicates the source for the media that is to be moved.
//
CHANGER_ELEMENT Source;
//
// Indicates the final destination of the media originally at Source.
//
CHANGER_ELEMENT Destination1;
//
// Indicates the destination of the media moved from Destination1.
//
CHANGER_ELEMENT Destination2;
//
// Indicates whether the medium should be flipped.
//
BOOLEAN Flip1;
BOOLEAN Flip2;
} CHANGER_EXCHANGE_MEDIUM, *PCHANGER_EXCHANGE_MEDIUM;
//
// Definitions for IOCTL_CHANGER_MOVE_MEDIUM
//
typedef struct _CHANGER_MOVE_MEDIUM {
//
// Indicates which transport to use for the move operation.
//
CHANGER_ELEMENT Transport;
//
// Indicates the source for the media that is to be moved.
//
CHANGER_ELEMENT Source;
//
// Indicates the destination of the media originally at Source.
//
CHANGER_ELEMENT Destination;
//
// Indicates whether the media should be flipped.
//
BOOLEAN Flip;
} CHANGER_MOVE_MEDIUM, *PCHANGER_MOVE_MEDIUM;
//
// Definitions for IOCTL_QUERY_VOLUME_TAGS
//
//
// Input buffer.
//
typedef struct _CHANGER_SEND_VOLUME_TAG_INFORMATION {
//
// Describes the starting element for which to return information.
//
CHANGER_ELEMENT StartingElement;
//
// Indicates the specific action to perform. See below.
//
ULONG ActionCode;
//
// Template used by the device to search for volume ids.
//
UCHAR VolumeIDTemplate[MAX_VOLUME_TEMPLATE_SIZE];
} CHANGER_SEND_VOLUME_TAG_INFORMATION, *PCHANGER_SEND_VOLUME_TAG_INFORMATION;
//
// Output buffer.
//
typedef struct _READ_ELEMENT_ADDRESS_INFO {
//
// Number of elements matching criteria set forth by ActionCode.
//
ULONG NumberOfElements;
//
// Array of CHANGER_ELEMENT_STATUS structures, one for each element that corresponded
// with the information passed in with the CHANGER_SEND_VOLUME_TAG_INFORMATION structure.
//
CHANGER_ELEMENT_STATUS ElementStatus[1];
} READ_ELEMENT_ADDRESS_INFO, *PREAD_ELEMENT_ADDRESS_INFO;
//
// Possible ActionCode values. See Features0 of CHANGER_GET_PARAMETERS for compatibility with
// the current device.
//
#define SEARCH_ALL 0x0 // Translate - search all defined volume tags.
#define SEARCH_PRIMARY 0x1 // Translate - search only primary volume tags.
#define SEARCH_ALTERNATE 0x2 // Translate - search only alternate volume tags.
#define SEARCH_ALL_NO_SEQ 0x4 // Translate - search all defined volume tags but ignore sequence numbers.
#define SEARCH_PRI_NO_SEQ 0x5 // Translate - search only primary volume tags but ignore sequence numbers.
#define SEARCH_ALT_NO_SEQ 0x6 // Translate - search only alternate volume tags but ignore sequence numbers.
#define ASSERT_PRIMARY 0x8 // Assert - as the primary volume tag - if tag now undefined.
#define ASSERT_ALTERNATE 0x9 // Assert - as the alternate volume tag - if tag now undefined.
#define REPLACE_PRIMARY 0xA // Replace - the primary volume tag - current tag ignored.
#define REPLACE_ALTERNATE 0xB // Replace - the alternate volume tag - current tag ignored.
#define UNDEFINE_PRIMARY 0xC // Undefine - the primary volume tag - current tag ignored.
#define UNDEFINE_ALTERNATE 0xD // Undefine - the alternate volume tag - current tag ignored.
//
// Changer diagnostic test related definitions
//
typedef enum _CHANGER_DEVICE_PROBLEM_TYPE {
DeviceProblemNone,
DeviceProblemHardware,
DeviceProblemCHMError,
DeviceProblemDoorOpen,
DeviceProblemCalibrationError,
DeviceProblemTargetFailure,
DeviceProblemCHMMoveError,
DeviceProblemCHMZeroError,
DeviceProblemCartridgeInsertError,
DeviceProblemPositionError,
DeviceProblemSensorError,
DeviceProblemCartridgeEjectError,
DeviceProblemGripperError,
DeviceProblemDriveError
} CHANGER_DEVICE_PROBLEM_TYPE, *PCHANGER_DEVICE_PROBLEM_TYPE;
// end_winioctl
#ifdef __cplusplus
}
#endif
#endif // _NTDDCHGR_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -