2.2.2.9.1.1 VDS_DISK_PROP

The VDS_DISK_PROP structure provides the properties of a disk.

 typedef struct _VDS_DISK_PROP {
   VDS_OBJECT_ID id;
   VDS_DISK_STATUS status;
   VDS_LUN_RESERVE_MODE ReserveMode;
   VDS_HEALTH health;
   DWORD dwDeviceType;
   DWORD dwMediaType;
   ULONGLONG ullSize;
   unsigned long ulBytesPerSector;
   unsigned long ulSectorsPerTrack;
   unsigned long ulTracksPerCylinder;
   unsigned long ulFlags;
   VDS_STORAGE_BUS_TYPE BusType;
   VDS_PARTITION_STYLE PartitionStyle;
   [switch_is(PartitionStyle)] union {
     [case(VDS_PST_MBR)] 
       DWORD dwSignature;
     [case(VDS_PST_GPT)] 
       GUID DiskGuid;
     [default]       ;
   };
   [string] WCHAR* pwszDiskAddress;
   [string] WCHAR* pwszName;
   [string] WCHAR* pwszFriendlyName;
   [string] WCHAR* pwszAdaptorName;
   [string] WCHAR* pwszDevicePath;
 } VDS_DISK_PROP,
  *PVDS_DISK_PROP;

id: The VDS object ID of the disk object.

status: The value from the VDS_DISK_STATUS enumeration that indicates the disk status.

ReserveMode: The value from the VDS_LUN_RESERVE_MODE enumeration that indicates the sharing mode of the disk.

health: The value from the VDS_HEALTH enumeration that indicates the health of the disk.

dwDeviceType: The device type of the disk. Note that this value refers to the disk type and not the drive type. Thus, if there is CD media in a DVD/CD drive, it is identified as FILE_DEVICE_CD_ROM; however, DVD media in the same drive is identified as FILE_DEVICE_DVD. This field can have the following values.

Value

Meaning

FILE_DEVICE_CD_ROM

0x00000002

The device is a CD-ROM.

FILE_DEVICE_DISK

0x00000007

The device is a hard disk or removable device.

FILE_DEVICE_DVD

0x00000033

The device is a DVD.

dwMediaType: The media type of the disk; it can have the following values.

Value

Meaning

Unknown

0x00000000

The disk media type is unknown.

RemovableMedia

0x0000000B

The disk media is removable.

FixedMedia

0x0000000C

The disk media is fixed.

ullSize: The size of the disk, in bytes.

ulBytesPerSector: The size of the sectors for the disk, in bytes.

ulSectorsPerTrack: The number of sectors per track on the disk.

ulTracksPerCylinder: The number of tracks per cylinder on the disk.

ulFlags: The combination of any values, by using a bitwise OR operator, that are defined in the VDS_DISK_FLAG enumeration. This field can be zero if none of the VDS_DISK_FLAG values apply.

BusType: The value from the VDS_STORAGE_BUS_TYPE enumeration that indicates the type of bus where the disk resides.

PartitionStyle: The value from the VDS_PARTITION_STYLE enumeration that indicates the partitioning format of the disk.

dwSignature: The MBR disk signature of the disk.

DiskGuid: The GUID in the GPT that identifies the disk.

pwszDiskAddress: The null-terminated Unicode address of the disk, if the disk uses a SCSI-like address; otherwise, NULL. If present, a client can use this property to determine the port number, bus, target number, and LUN of the disk.

pwszName: The null-terminated Unicode name that the operating system uses to identify the disk. If present, a client can use this property to determine the disk's PNP device number. This is the number obtained from the DeviceNumber member of STORAGE_DEVICE_NUMBER (see [MSDN-STRGEDEVNUM]). For a hard disk, this name has the format \\?\PhysicalDriveN, where N signifies the device number of the disk. For a DVD/CD drive, this name has the format \\?\CdRomN, where N signifies the device number of the DVD/CD drive. A client can use this property to identify the disk.

pwszFriendlyName: The null-terminated Unicode friendly (human-readable) name of the disk as assigned by the operating system. This property MAY be NULL. If present, a client can use this property to display a human-readable name of the disk.

pwszAdaptorName: The null-terminated Unicode name that the operating system assigns to the adapter to which the disk is attached. This property MAY be NULL. If present, a client can use this property to display the adapter name of the disk.

pwszDevicePath: The null-terminated Unicode device path that the operating system uses to identify the device for the disk. This property MAY be NULL. If present, a client can use this property to display the device path of the disk. This string is used to load the property page information for a disk.