DISK_GEOMETRY - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntdddisk.h

typedef struct _DISK_GEOMETRY {
  LARGE_INTEGER Cylinders;
  MEDIA_TYPE    MediaType;
  ULONG         TracksPerCylinder;
  ULONG         SectorsPerTrack;
  ULONG         BytesPerSector;
} DISK_GEOMETRY, *PDISK_GEOMETRY;

View the official Windows Driver Kit DDI reference
// winioctl.h

typedef struct _DISK_GEOMETRY {
  LARGE_INTEGER Cylinders;
  MEDIA_TYPE    MediaType;
  DWORD         TracksPerCylinder;
  DWORD         SectorsPerTrack;
  DWORD         BytesPerSector;
} DISK_GEOMETRY, *PDISK_GEOMETRY;

View the official Win32 API reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-ntdddisk-_disk_geometry)

_DISK_GEOMETRY structure

Description

The DISK_GEOMETRY structure is obsolete and provided only to support existing drivers. New drivers must use DISK_GEOMETRY_EX. DISK_GEOMETRY is used in conjunction with the IOCTL_DISK_GET_DRIVE_GEOMETRY and the IOCTL_DISK_GET_MEDIA_TYPES requests, in order to retrieve information about the geometry of a physical disk.

Members

Cylinders

Indicates the number of cylinders on the disk device.

MediaType

Indicates the type of disk. The enumeration MEDIA_TYPE lists the values that can be assigned to this member.

TracksPerCylinder

Indicates the number of tracks in a cylinder.

SectorsPerTrack

Indicates the number of sectors in each track.

BytesPerSector

Indicates the number of bytes in a disk sector.

Remarks

DISK_GEOMETRY_EX must be used with new drivers, in order to accommodate GUID Partition Table (GPT) partitions. The DISK_GEOMETRY structure is nested within the DISK_GEOMETRY_EX structure.

IOCTL_DISK_GET_MEDIA_TYPES causes an array of these structures to be returned.

See also

DISK_GEOMETRY_EX

IOCTL_DISK_GET_DRIVE_GEOMETRY

IOCTL_DISK_GET_MEDIA_TYPES


Win32 API reference (ns-winioctl-disk_geometry)

DISK_GEOMETRY structure

Description

Describes the geometry of disk devices and media.

Members

Cylinders

The number of cylinders. See LARGE_INTEGER.

MediaType

The type of media. For a list of values, see MEDIA_TYPE.

TracksPerCylinder

The number of tracks per cylinder.

SectorsPerTrack

The number of sectors per track.

BytesPerSector

The number of bytes per sector.

See also

IOCTL_DISK_GET_DRIVE_GEOMETRY, IOCTL_STORAGE_GET_MEDIA_TYPES, MEDIA_TYPE