SYSTEM_DEVICE_INFORMATION

The SYSTEM_DEVICE_INFORMATION structure is what a successful call to ZwQuerySystemInformation or NtQuerySystemInformation produces in its output buffer when given the information class SystemDeviceInformation (0x07).

Documentation Status

The SYSTEM_DEVICE_INFORMATION structure is not documented.

A comment in NTDDK.H says of the documented CONFIGURATION_INFORMATION structure that “it is used by the NtQuerySystemInformation system service to return device type counts.” Be aware that “used by” would seem to mean only that a CONFIGURATION_INFORMATION in the kernel provides the data that gets returned, not that the data is returned as a CONFIGURATION_INFORMATION.

Layout

The SYSTEM_DEVICE_INFORMATION is 0x18 bytes in both 32-bit and 64-bit Windows.

Offset Definition
0x00
ULONG NumberOfDisks;
0x04
ULONG NumberOfFloppies;
0x08
ULONG NumberOfCdRoms;
0x0C
ULONG NumberOfTapes;
0x10
ULONG NumberOfSerialPorts;
0x14
ULONG NumberOfParallelPorts;