IoGetConfigurationInformation function

The IoGetConfigurationInformation routine returns a pointer to the I/O manager's global configuration information structure, which contains the current values for how many physical disk, floppy, CD-ROM, tape, SCSI HBA, serial, and parallel devices have device objects created to represent them by drivers as they are loaded.





This function has no parameters.

Return Value

IoGetConfigurationInformation returns a pointer to the configuration information structure. This structure is defined as follows:

// This field indicates the total number of disks in the system. This
// number should be used by the driver to determine the names of new
// disks. This field should be updated by the driver as it finds new
// disks.

ULONG DiskCount;                // Count of hard disks thus far
ULONG FloppyCount;              // Count of floppy disks thus far
ULONG CdRomCount;               // Count of CD-ROM drives thus far
ULONG TapeCount;                // Count of tape drives thus far
ULONG ScsiPortCount;            // Count of SCSI port adapters thus far
ULONG SerialCount;              // Count of serial devices thus far
ULONG ParallelCount;            // Count of parallel devices thus far

// These next two fields indicate ownership of the two I/O address
// spaces that are used by WD1003-compatible disk controllers.

BOOLEAN AtDiskPrimaryAddressClaimed;    // 0x1F0 - 0x1FF
BOOLEAN AtDiskSecondaryAddressClaimed;  // 0x170 - 0x17F

// Indicates the structure version, as anything value beyond this will have been added.
// Use the structure size as the version.

ULONG Version;

// Indicates the total number of medium changer devices in the system.
// This field will be updated by the drivers as it determines that
// new devices have been found and will be supported.

ULONG MediumChangerCount;



Certain types of device drivers can use the configuration information structure's values to construct device object names with appropriate digit suffixes when each driver creates its device objects. Note that the digit suffix for device object names is a zero-based count, while the counts maintained in the configuration information structure represent the number of device objects of a particular type already created. That is, the configuration information counts are one-based.

Any driver that calls IoGetConfigurationInformation must increment the count for its kind of device in this structure when it creates a device object to represent a physical device.

The system-supplied SCSI port driver supplies the count of SCSI HBAs present in the computer. SCSI class drivers can read this value to determine how many HBA-specific miniport drivers might control a SCSI bus with an attached device of the class driver's type.

The configuration information structure also contains a value indicating whether an already loaded driver has claimed either of the "AT" disk I/O address ranges.


Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header ntddk.h (include Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
DDI compliance rules IrqlIoPassive5, PowerIrpDDis, HwStorPortProhibitedDDIs

See Also