PCONFIGURATION_INFORMATION
IoGetConfigurationInformation(
);
IoGetConfigurationInformation 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.
Return Value
IoGetConfigurationInformation returns a pointer to the configuration information structure. This structure is defined as follows:
typedef struct _CONFIGURATIONAL_INFORMATION{
//
// Each field indicates the total number of physical
// devices of a particular type in the machine. The value
// should be used by the driver to determine the digit
// suffix for device object names. This field must be
// updated as the driver finds new devices of its own.
//
ULONG DiskCount; // Count of hard disks so far.
ULONG FloppyCount; // Count of floppy drives so far.
ULONG CDRomCount; // Count of CD-ROM drives so far.
ULONG TapeCount; // Count of tape drives so far.
ULONG ScsiPortCount; // Count of HBAs so far.
ULONG SerialCount; // Count of serial ports so far.
ULONG ParallelCount; // Count of parallel ports so far.
//
// The next two fields indicate ownership of
// either of the two I/O address spaces
// that are used by WD1003-compatible disk controllers.
//
BOOLEAN AtDiskPrimaryAddressClaimed; //0x1F0-0x1FF
BOOLEAN AtDiskSecondaryAddressClaimed; //0x170-0x17F
} CONFIGURATION_INFORMATION,*PCONFIGURATION_INFORMATION
Comments
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 machine. 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.
Callers of IoGetConfigurationInformation must be running at IRQL PASSIVE_LEVEL.
See Also
HalAssignSlotResources, HalGetBusData, HalGetBusDataByOffset, IoAssignResources, IoQueryDeviceDescription, IoReportResourceUsage