// ntddstor.h
typedef struct _STORAGE_DEVICE_NUMBER {
DEVICE_TYPE DeviceType;
ULONG DeviceNumber;
ULONG PartitionNumber;
} STORAGE_DEVICE_NUMBER, *PSTORAGE_DEVICE_NUMBER;
View the official Windows Driver Kit DDI reference// winioctl.h
typedef struct _STORAGE_DEVICE_NUMBER {
DEVICE_TYPE DeviceType;
DWORD DeviceNumber;
DWORD PartitionNumber;
} STORAGE_DEVICE_NUMBER, *PSTORAGE_DEVICE_NUMBER;
View the official Win32 API referenceNo description available.
The STORAGE_DEVICE_NUMBER structure is used in conjunction with the IOCTL_STORAGE_GET_DEVICE_NUMBER request to retrieve the FILE_DEVICE_XXX device type, the device number, and, for a device that can be partitioned, the partition number assigned to a device by the driver when the device is started.
DeviceTypeSpecifies one of the system-defined FILE_DEVICE_XXX constants indicating the type of device (such as FILE_DEVICE_DISK, FILE_DEVICE_KEYBOARD, and so forth) or a vendor-defined value for a new type of device. For more information, see Specifying Device Types.
DeviceNumberIndicates the number of this device. This value is set to 0xFFFFFFFF (-1) for the disks that represent the physical paths of an MPIO disk.
PartitionNumberIndicates the partition number of the device is returned in this member, if the device can be partitioned. Otherwise, -1 is returned.
The IOCTL_STORAGE_GET_DEVICE_NUMBER request is usually issued by a fault-tolerant disk driver.
The values in the STORAGE_DEVICE_NUMBER structure are guaranteed to remain unchanged until the system is rebooted. They are not guaranteed to be persistent across boots.
IOCTL_STORAGE_GET_DEVICE_NUMBER
Contains information about a device. This structure is used by the IOCTL_STORAGE_GET_DEVICE_NUMBER control code.
DeviceTypeThe type of device. Values from 0 through 32,767 are reserved for use by Microsoft. Values from 32,768 through 65,535 are reserved for use by other vendors. The following values are defined by Microsoft:
DeviceNumberThe number of this device.
PartitionNumberThe partition number of the device, if the device can be partitioned. Otherwise, this member is –1.
The values in the STORAGE_DEVICE_NUMBER structure are guaranteed to remain unchanged until the device is removed or the system is restarted. They are not guaranteed to be persistent across device or system restarts.
IOCTL_STORAGE_GET_DEVICE_NUMBER