2.3.1.2 DISK_INFO
The DISK_INFO structure provides information about a disk.
-
struct diskinfo { LdmObjectId id; LONGLONG length; LONGLONG freeBytes; unsigned long bytesPerTrack; unsigned long bytesPerCylinder; unsigned long bytesPerSector; unsigned long regionCount; unsigned long dflags; unsigned long deviceType; unsigned long deviceState; unsigned long busType; unsigned long attributes; boolean isUpgradeable; int portNumber; int targetNumber; int lunNumber; LONGLONG lastKnownState; LdmObjectId taskId; int cchName; int cchVendor; int cchDgid; int cchAdapterName; int cchDgName; [size_is(cchName)] wchar_t* name; [size_is(cchVendor)] wchar_t* vendor; [size_is(cchDgid)] byte* dgid; [size_is(cchAdapterName)] wchar_t* adapterName; [size_is(cchDgName)] wchar_t* dgName; }; typedef struct diskinfo DISK_INFO;
id: Specifies the OID of the disk.
length: Size of the disk, in bytes.
freeBytes: Number of unallocated bytes on the disk.
bytesPerTrack: Size of a disk track, in bytes.
bytesPerCylinder: Size of a disk cylinder, in bytes.
bytesPerSector: Size of a disk sector, in bytes.
regionCount: Total number of regions on the disk.
dflags: Disk type of the disk.
-
Value
Meaning
DISK_AUDIO_CD
0x00000001
Disk is an audio CD.
DISK_NEC98
0x00000002
This value is obsolete and MUST NOT be used.
deviceType: Device type of the disk. This field contains one of the following values.
-
Value
Meaning
DEVICETYPE_UNKNOWN
0x00000000
Device is of an unknown type.
DEVICETYPE_VM
0x00000001
Device is a dynamic disk.
DEVICETYPE_REMOVABLE
0x00000002
Device uses removable media.
DEVICETYPE_CDROM
0x00000003
Device is a CD-ROM.
DEVICETYPE_FDISK
0x00000004
Device is a basic disk.
DEVICETYPE_DVD
0x00000005
Device is a DVD.
deviceState: Device state of the disk. The value of this field is generated by combining zero or more of the applicable flags with a logical OR operation. Valid combinations are device-type dependent.
-
Value
Meaning
DEVICESTATE_UNKNOWN
0x00000000
Disk is in an unknown state.
DEVICESTATE_HEALTHY
0x00000001
Disk is fully functional.
DEVICESTATE_NO_MEDIA
0x00000002
Disk has no media.
DEVICESTATE_NOSIG
0x00000004
Disk has an invalid signature.
DEVICESTATE_BAD
0x00000008
Disk was deleted or experienced an install or hardware problem.
DEVICESTATE_NOT_READY
0x00000010
Disk is not ready yet.
DEVICESTATE_MISSING
0x00000020
Disk is no longer available.
DEVICESTATE_OFFLINE
0x00000040
Disk is offline.
DEVICESTATE_FAILING
0x00000080
Disk experienced a physical I/O error.
DEVICESTATE_IMPORT_FAILED
0x00000100
Disk belongs to a group whose import failed.
DEVICESTATE_UNCLAIMED
0x00000200
Disk belongs to a foreign disk group.
busType: Type of bus on which the disk resides. This field contains one of the following values.
-
Value
Meaning
BUSTYPE_UNKNOWN
0x00000000
Bus type is unknown.
BUSTYPE_IDE
0x00000001
Disk resides on an Integrated Drive Electronics (IDE) bus.
BUSTYPE_SCSI
0x00000002
Disk resides on a SCSI bus.
BUSTYPE_FIBRE
0x00000003
Disk resides on a fiber channel bus.
BUSTYPE_USB
0x00000004
Disk resides on a universal serial bus (USB).
BUSTYPE_SSA
0x00000005
Disk resides on a serial storage architecture (SSA) Bus.
BUSTYPE_1394
0x00000006
Disk resides on an Institute of Electronics and Electrical Engineers (IEEE) 1394 bus.
attributes: Bitmap of disk attributes. The value of this field is generated by combining zero or more of the applicable flags defined in the following table with a logical OR operation.
-
Value
Meaning
DEVICEATTR_NONE
0x00000000
Disk has no attributes.
DEVICEATTR_RDONLY
0x00000001
Disk is read-only.
DEVICEATTR_NTMS
0x00000002
This value is obsolete.
isUpgradeable: Boolean value that indicates whether the disk can be converted to a dynamic disk. Will be true if the disk is basic, healthy, and has 512 byte sectors.
-
Value
Meaning
FALSE
0
Disk cannot be converted to a dynamic disk.
TRUE
1
Disk can be encapsulated or converted to a dynamic disk.
portNumber: SCSI port number of the disk, if the bus reports this information.
targetNumber: SCSI target identifier of the disk, if the bus reports this information.
lunNumber: SCSI logical unit number (LUN) of the disk, if the bus reports this information.
lastKnownState: Modification sequence number of the disk.
taskId: The task identifier of the associated user request. If no request is made, the value is 0. For more information about this task identifier, see section 2.2.17.
cchName: Length of the hard disk physical name, in Unicode characters, including the terminating null character.
cchVendor: Length of the disk's vendor name, in Unicode characters, including the terminating null character.
cchDgid: Length of the disk's group identification handle, in ASCII characters, including the terminating null character.
cchAdapterName: Length of the disk's adapter name, in Unicode characters, including the terminating null character.
cchDgName: Length of the disk's group name, in Unicode characters, including the terminating null character.
name: Null-terminated physical device name of the hard disk, in the format '\device\Harddisk1'. This is Unicode.
vendor: Null-terminated name of the hard disk vendor. This is the disk vendor's disk model name. This is Unicode.
dgid: Specifies the object identifier of the disk's disk group. This is ASCII.
adapterName: Null-terminated name of the disk adapter as returned by the disk adapter firmware; for example, 'Adaptec AHA-2940U2W - Ultra2 SCSI'. This is Unicode.
dgName: Null-terminated name for the disk's disk group, if the disk is dynamic. Only dynamic disks have an associated disk group. Basic disks do not. This is Unicode.