Bewerken

Delen via


STORAGE_DEVICE_DESCRIPTOR structure (ntddstor.h)

The STORAGE_DEVICE_DESCRIPTOR structure is used in conjunction with the IOCTL_STORAGE_QUERY_PROPERTY request to retrieve the storage device descriptor data for a device.

Syntax

typedef struct _STORAGE_DEVICE_DESCRIPTOR {
  ULONG            Version;
  ULONG            Size;
  UCHAR            DeviceType;
  UCHAR            DeviceTypeModifier;
  BOOLEAN          RemovableMedia;
  BOOLEAN          CommandQueueing;
  ULONG            VendorIdOffset;
  ULONG            ProductIdOffset;
  ULONG            ProductRevisionOffset;
  ULONG            SerialNumberOffset;
  STORAGE_BUS_TYPE BusType;
  ULONG            RawPropertiesLength;
  UCHAR            RawDeviceProperties[1];
} STORAGE_DEVICE_DESCRIPTOR, *PSTORAGE_DEVICE_DESCRIPTOR;

Members

Version

Indicates the size of the STORAGE_DEVICE_DESCRIPTOR structure. The value of this member will change as members are added to the structure.

Size

Specifies the total size of the descriptor in bytes, including ID strings which are appended to the structure.

DeviceType

Specifies the device type as defined by the Small Computer Systems Interface (SCSI) specification.

DeviceTypeModifier

Specifies the device type modifier, if any, as defined by the SCSI specification. If no device type modifier exists, this member is zero.

RemovableMedia

Indicates when TRUE that the device's media (if any) is removable. If the device has no media, this member should be ignored. When FALSE the device's media is not removable.

CommandQueueing

Indicates when TRUE that the device supports multiple outstanding commands (SCSI tagged queuing or equivalent). When FALSE, the device does not support SCSI-tagged queuing or the equivalent. The STORPORT driver is responsible for synchronizing the commands.

VendorIdOffset

Specifies the byte offset from the beginning of the structure to a NULL-terminated ASCII string that contains the device's vendor ID. If the device has no vendor ID, this member is zero.

ProductIdOffset

Specifies the byte offset from the beginning of the structure to a NULL-terminated ASCII string that contains the device's product ID. If the device has no product ID, this member is zero.

ProductRevisionOffset

Specifies the byte offset from the beginning of the structure to a NULL-terminated ASCII string that contains the device's product revision string. If the device has no product revision string, this member is zero.

SerialNumberOffset

Specifies the byte offset from the beginning of the structure to a NULL-terminated ASCII string that contains the device's serial number. If the device has no serial number, this member is zero.

BusType

Specifies an enumerator value of type STORAGE_BUS_TYPE that indicates the type of bus to which the device is connected. This should be used to interpret the raw device properties at the end of this structure (if any).

RawPropertiesLength

Indicates the number of bytes of bus-specific data that have been appended to this descriptor.

RawDeviceProperties[1]

Contains an array of length one that serves as a place holder for the first byte of the bus specific property data.

Remarks

Applications and storage class drivers issue a device-control request with the I/O control code IOCTL_STORAGE_QUERY_PROPERTY to retrieve this structure, which contains information about a target device. The structure can be retrieved only from an FDO; attempting to retrieve device properties from an adapter causes an error.

An application or driver can determine the required buffer size by casting the retrieved STORAGE_DEVICE_DESCRIPTOR structure to a STORAGE_DESCRIPTOR_HEADER, which contains only Version and Size.

Requirements

Requirement Value
Header ntddstor.h (include Ntddstor.h)

See also

IOCTL_STORAGE_QUERY_PROPERTY

IoBuildDeviceIoControlRequest

STORAGE_ADAPTER_DESCRIPTOR

STORAGE_BUS_TYPE

STORAGE_DESCRIPTOR_HEADER

STORAGE_DEVICE_DESCRIPTOR

STORAGE_DEVICE_ID_DESCRIPTOR