<div class="content" name="DISK_INFO_EX" uuid="7d94d560-37f2-4031-8c3e-ecfd2dc1ec9f"><p> </p><p>The DISK_INFO_EX structure provides information about a <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_c4133b2a-a990-4042-ba44-7fda3090f118" data-linktype="relative-path">disk</a></span>.</p><dl>
<dd>
<div><pre> struct diskinfoex {
   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;
   unsigned long maxPartitionCount;
   boolean isUpgradeable;
   boolean maySwitchStyle;
   PARTITIONSTYLE partitionStyle;
   [switch_is(partitionStyle)] union {
     [case(PARTITIONSTYLE_MBR)] 
       struct {
       unsigned long signature;
     } mbr;
     [case(PARTITIONSTYLE_GPT)] 
       struct {
       GUID diskId;
     } gpt;
     [default]       ;
   };
   int portNumber;
   int targetNumber;
   int lunNumber;
   LONGLONG lastKnownState;
   LdmObjectId taskId;
   int cchName;
   int cchVendor;
   int cchDgid;
   int cchAdapterName;
   int cchDgName;
   int cchDevInstId;
   [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;
   [size_is(cchDevInstId)] wchar_t* devInstId;
 };
 typedef struct diskinfoex DISK_INFO_EX;
</pre></div>
</dd></dl><p><b>id:</b>  Specifies the OID of the disk.</p><p><b>length:</b>   Size of the disk in bytes.</p><p><b>freeBytes:</b>  Number of unallocated
bytes on the disk.</p><p><b>bytesPerTrack:</b>  Size of a disk <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_97ccb480-d025-4a9c-995a-5ead9d3076f9" data-linktype="relative-path">track</a></span>
in bytes.</p><p><b>bytesPerCylinder:</b>  Size of a disk <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_cb6bd999-9860-47c5-a5d6-0f267edcaabb" data-linktype="relative-path">cylinder</a></span>
in bytes.</p><p><b>bytesPerSector:</b>  Size of a disk <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_b5bbe646-aa5f-4b4e-ae9e-bdae444cbfa2" data-linktype="relative-path">sector</a></span>
in bytes.</p><p><b>regionCount:</b>  Total number of
regions on the disk.</p><p><b>dflags:</b>  <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_e73d1856-ae37-4059-8ffb-1b22002219f1" data-linktype="relative-path">Disk type</a></span> of the
disk. The value of this field is generated by combining zero or more of the
applicable <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_425bcab9-7911-4eae-b414-624b7a51eb5f" data-linktype="relative-path">flags</a></span> with a logical
OR operation.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>DISK_AUDIO_CD 0x00000001</td>
  <td>Disk is an audio CD.</td>
 </tr><tr>
  <td>DISK_NEC98 0x00000002</td>
  <td>This value is obsolete and MUST NOT be returned.</td>
 </tr><tr>
  <td>DISK_FORMATTABLE_DVD 0x00000004</td>
  <td>Disk is a DVD that can be formatted.</td>
 </tr><tr>
  <td>DISK_MEMORY_STICK 0x00000008</td>
  <td>Disk is a memory stick.</td>
 </tr><tr>
  <td>DISK_NTFS_NOT_SUPPORTED 0x000000010</td>
  <td>Disk does not support being formatted as NTFS.</td>
 </tr></tbody></table>
</dd></dl><p><b>deviceType:</b>  Device type of the
disk.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>DEVICETYPE_UNKNOWN 0x00000000</td>
  <td>Device is of an unknown type.</td>
 </tr><tr>
  <td>DEVICETYPE_VM 0x00000001</td>
  <td>Device is a dynamic disk.</td>
 </tr><tr>
  <td>DEVICETYPE_REMOVABLE 0x00000002</td>
  <td>Device uses removable media.</td>
 </tr><tr>
  <td>DEVICETYPE_CDROM 0x00000003</td>
  <td>Device is a CD-ROM.</td>
 </tr><tr>
  <td>DEVICETYPE_FDISK 0x00000004</td>
  <td>Device is a basic disk.</td>
 </tr><tr>
  <td>DEVICETYPE_DVD 0x00000005</td>
  <td>Device is a DVD.</td>
 </tr></tbody></table>
</dd></dl><p><b>deviceState:</b>   Device state of the
disk.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>DEVICESTATE_UNKNOWN 0x00000000</td>
  <td>Disk is in an unknown state.</td>
 </tr><tr>
  <td>DEVICESTATE_HEALTHY 0x00000001</td>
  <td>Disk is fully functional.</td>
 </tr><tr>
  <td>DEVICESTATE_NO_MEDIA 0x00000002</td>
  <td>Disk has no media.</td>
 </tr><tr>
  <td>DEVICESTATE_NOSIG 0x00000004</td>
  <td>Disk has an invalid signature.</td>
 </tr><tr>
  <td>DEVICESTATE_BAD 0x00000008</td>
  <td>Disk experienced a geometry failure.</td>
 </tr><tr>
  <td>DEVICESTATE_NOT_READY 0x00000010</td>
  <td>Disk is not ready yet.</td>
 </tr><tr>
  <td>DEVICESTATE_MISSING 0x00000020</td>
  <td>Disk is no longer available.</td>
 </tr><tr>
  <td>DEVICESTATE_OFFLINE 0x00000040</td>
  <td>Disk is offline.</td>
 </tr><tr>
  <td>DEVICESTATE_FAILING 0x00000080</td>
  <td>Disk experienced a physical I/O error.</td>
 </tr><tr>
  <td>DEVICESTATE_IMPORT_FAILED 0x00000100</td>
  <td>Disk belongs to a group whose import failed. See disk group import.</td>
 </tr><tr>
  <td>DEVICESTATE_UNCLAIMED 0x00000200</td>
  <td>Disk belongs to a foreign disk group.</td>
 </tr></tbody></table>
</dd></dl><p><b>busType:</b>   Type of <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_36805c8d-5505-4906-986b-8b08a4f0741e" data-linktype="relative-path">bus</a></span>
on which the disk resides.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>BUSTYPE_UNKNOWN 0x00000000</td>
  <td>Bus type is unknown.</td>
 </tr><tr>
  <td>BUSTYPE_IDE 0x00000001</td>
  <td>Disk resides on an IDE bus.</td>
 </tr><tr>
  <td>BUSTYPE_SCSI 0x00000002</td>
  <td>Disk resides on an SCSI bus.</td>
 </tr><tr>
  <td>BUSTYPE_FIBRE 0x00000003</td>
  <td>Disk resides on a fiber channel bus.</td>
 </tr><tr>
  <td>BUSTYPE_USB 0x00000004</td>
  <td>Disk resides on a USB.</td>
 </tr><tr>
  <td>BUSTYPE_SSA 0x00000005</td>
  <td>Disk resides on an SSA bus.</td>
 </tr><tr>
  <td>BUSTYPE_1394 0x00000006</td>
  <td>Disk resides on an IEEE 1394 bus.</td>
 </tr></tbody></table>
</dd></dl><p><b>attributes:</b>  Bitmap of disk
attributes.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>DEVICEATTR_NONE 0x00000000</td>
  <td>Disk has no attributes.</td>
 </tr><tr>
  <td>DEVICEATTR_RDONLY 0x00000001</td>
  <td>Disk is read-only.</td>
 </tr><tr>
  <td>DEVICEATTR_NTMS 0x00000002</td>
  <td>This value is obsolete.</td>
 </tr></tbody></table>
</dd></dl><p><b>maxPartitionCount:</b>   Maximum number
of partitions on the disk.</p><p><b>isUpgradeable:</b>   Boolean value that
indicates if the disk can be converted to a dynamic disk. True if the disk is
basic, healthy, and has 512-byte sectors.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>FALSE 0</td>
  <td>Disk cannot be encapsulated or converted to a dynamic disk.</td>
 </tr><tr>
  <td>TRUE 1</td>
  <td>Disk can be encapsulated or converted to a dynamic disk.</td>
 </tr></tbody></table>
</dd></dl><p><b>maySwitchStyle:</b>   Boolean value that
indicates if the disk&#39;s partition style can be changed from <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_b251c771-5ccf-40f2-b98d-0119db210b4b" data-linktype="relative-path">MBR</a></span>
to <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_2fc866b7-7f83-479a-ad4e-fdffcbcff989" data-linktype="relative-path">GPT</a></span>,
or changed from GPT to MBR.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>FALSE 0</td>
  <td>Partition style of the disk cannot be changed.</td>
 </tr><tr>
  <td>TRUE 1</td>
  <td>Partition style of the disk can be changed between MBR and GPT.</td>
 </tr></tbody></table>
</dd></dl><p><b>partitionStyle:</b>   Value from the <span><a href="c17c0433-880e-4f57-9b71-23e9379d0594" data-linktype="relative-path">PARTITIONSTYLE</a></span>
enumeration that indicates the disk&#39;s partitioning style.</p><p><b>(unnamed union):</b>  A union that
contains either a <b>signature</b> or a <b>diskId</b>, depending on the value
of <b>partitionStyle:</b></p><p><b>signature:</b>  Signature of the disk.
The <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_0e4c21af-021e-4059-ae9a-7821ec3c2e39" data-linktype="relative-path">disk
signature</a></span> is not guaranteed to be unique across machines.<a id="Appendix_A_Target_8"></a><a aria-label="Product behavior note 8" href="5f5043a3-9e6d-40cc-a05b-1a4a3617df32#Appendix_A_8" data-linktype="relative-path">&lt;8&gt;</a></p><p><b>diskId:</b>  <span><a href="../ms-dtyp/49e490b8-f972-45d6-a3a4-99f924998d97" data-linktype="relative-path">GUID</a></span>,
as specified in <span><a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a></span>,
section 2.3.4.1, of the disk.<a id="Appendix_A_Target_9"></a><a aria-label="Product behavior note 9" href="5f5043a3-9e6d-40cc-a05b-1a4a3617df32#Appendix_A_9" data-linktype="relative-path">&lt;9&gt;</a></p><p><b>portNumber:</b>  <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_9e1126a3-da48-4fd8-aafa-17b25c8818f5" data-linktype="relative-path">SCSI port
number</a></span> of the disk.</p><p><b>targetNumber:</b>   SCSI target
identifier of the disk.</p><p><b>lunNumber:</b>  <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_17a307c8-d4b9-4a78-bf01-a1b5a2da11db" data-linktype="relative-path">SCSI LUN</a></span>
of the disk.</p><p><b>lastKnownState:</b>  <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_5a574d80-6bdb-4fb0-a0dd-b0601d16b4cd" data-linktype="relative-path">Modification
sequence number</a></span> of the disk. </p><p><b>taskId:</b>   The task identifier of the
associated user request. If no request is made, the value is 0.</p><p><b>cchName:</b>   Length of the hard disk&#39;s
physical name, including the terminating null character.</p><p><b>cchVendor:</b>   Length of the disk&#39;s
vendor name, including the terminating null character.</p><p><b>cchDgid:</b>   Length of the disk&#39;s
group identification handle, including the terminating null character.</p><p><b>cchAdapterName:</b>   Length of the
disk&#39;s adapter name, including the terminating null character.</p><p><b>cchDgName:</b>   Length of the disk&#39;s
group name, including the terminating null character.</p><p><b>cchDevInstId:</b>   Length of the disk&#39;s
device instance <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_2cd71385-2d9c-4ab8-bf4a-7b258816d613" data-linktype="relative-path">path</a></span>, including the
terminating null character.</p><p><b>name:</b>  Null-terminated physical name
of the hard disk. For example: &#39;\device\Harddisk1&#39;. </p><p><b>vendor:</b>   Null-terminated name of
the hard disk vendor. This is the disk vendor&#39;s disk model name. For example:
&#34;SEAGATE ST34573N SCSI Disk Device&#34;.</p><p><b>dgid:</b>   Specifies the object
identifier of the disk&#39;s disk group.</p><p><b>adapterName:</b>   Null-terminated name
of the <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_13bf93c4-ba9e-4e36-a915-4a238b3da763" data-linktype="relative-path">disk adapter</a></span>. For
example: &#34;Adaptec AHA-2940U2W - Ultra2 SCSI&#34;.</p><p><b>dgName:</b>  Null-terminated name for
the disk&#39;s disk group, if the disk is dynamic.</p><p><b>devInstId:</b>  Null-terminated device
instance path of the disk with the backslashes replaced by &#34;#&#34;,
&#34;\\?\&#34; prepended to the beginning, and the Pnp disk class <span><a href="3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a></span>,
as specified in [MS-DTYP] section <span><a href="../ms-dtyp/222af2d3-5c00-4899-bc87-ed4c6515e80d" data-linktype="relative-path">2.3.4.3</a></span>,
appended to the end. For example:
&#34;\\?\ide#diskwdc_wd1600jd-75hbb0_____________________08.02d08#5&amp;15c8d966&amp;0&amp;0.0.0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}&#34;.
</p></div>