2.2.2.10.2.1 VDS_DISK_PROP2

The VDS_DISK_PROP2 structure provides the properties of a disk.

 typedef struct _VDS_DISK_PROP2 {
   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;
   [string] WCHAR *pwszLocationPath;
 } VDS_DISK_PROP2,
  *PVDS_DISK_PROP2;

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 includes 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 volume 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 is removable media.

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.

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. 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.

pwszLocationPath: This string is built from a combination of the DEVPKEY_Device_LocationPaths value for the disk's adapter, the bus type, and the SCSI address. The DEVPKEY_Device_LocationPaths property represents the location of a device instance in the device tree.

The following table shows examples of location paths built for various bus/disk types.

Bus/disk type

Location path

IDE\ATA\PATA\SATA

PCIROOT(0)#PCI(0100)#ATA(C01T03L00)

SCSI

PCIROOT(0)#PCI(1C00)#PCI(0000)#SCSI(P00T01L01)

SAS

PCIROOT(1)#PCI(0300)#SAS(P00T03L00)

PCI RAID

PCIROOT(0)#PCI(0200)#PCI(0003)#PCI(0100)#RAID(P02T00L00)