2.2.2.13.1.1 VDS_ADVANCEDDISK_PROP

The VDS_ADVANCEDDISK_PROP structure<49> provides the properties of a disk.

 typedef struct _VDS_ADVANCEDDISK_PROP 
 {
   [string] LPWSTR pwszId;
   [string] LPWSTR pwszPathname;
   [string] LPWSTR pwszLocation;
   [string] LPWSTR pwszFriendlyName;
   [string] LPWSTR pswzIdentifier;
   USHORT usIdentifierFormat;
   ULONG ulNumber;
   [string] LPWSTR pwszSerialNumber;
   [string] LPWSTR pwszFirmwareVersion;
   [string] LPWSTR pwszManufacturer;
   [string] LPWSTR pwszModel;
   ULONGLONG ullTotalSize;
   ULONGLONG ullAllocatedSize;
   ULONG ulLogicalSectorSize;
   ULONG ulPhysicalSectorSize;
   ULONG ulPartitionCount;
   VDS_DISK_STATUS status;
   VDS_HEALTH health;
   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];
   };
   ULONG ulFlags;
   DWORD dwDeviceType;
 } VDS_ADVANCEDDISK_PROP, *PVDS_ADVANCEDDISK_PROP;

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

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

pwszLocation: 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)

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.

pswzIdentifier: The VPD 0x83 Identifier for the disk.

usIdentifierFormat: The VPD 0x83 Identifier for the disk.

ulNumber: The device number of the disk.

pwszSerialNumber: The null-terminated serial number of the device. This value is NULL if no serial number exists.

pwszFirmwareVersion: The firmware version number as specified by the device manufacturer. This value is NULL if no firmware version exists.

pwszManufacturer: The null-terminated name of the device manufacturer. This value is NULL if no manufacturer name exists.

pwszModel: The model as specified by the device manufacturer. This value is NULL if no model name exists.

ullTotalSize: The size of the disk, in bytes.

ullAllocatedSize: The allocated size of the disk, in bytes. It is the total size minus the total size of free extents on the disk.

ulLogicalSectorSize: The size of the logical sectors for the disk, in bytes This can be different from physical in the case of 512 emulated devices.

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

ulPartitionCount: The number of partitions on the disk.

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

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

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.

ulFlags: The combination of any values, by using a bitwise OR operator, that are defined in the VDS_DISK_FLAG enumeration.

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.