Enumerators locate and identify Plug and Play devices and retrieve information about these devices to use to construct the hardware tree. The Configuration Manager provides services for registering enumerators as well as services enumerators can use to carry out their enumeration tasks. In particular, an enumerator can register an enumeration handler function by using the CONFIGMG_Register_Enumerator service. The Configuration Manager sends an enumeration message to this handler whenever it needs the enumerator to carry out a task.
There are these enumeration services.
Service | Description |
---|---|
CONFIGMG_CallBack_Enumerator | Calls back to the device driver, once per devnode. |
CONFIGMG_Get_Bus_Info | Gets bus information from the devnode. |
CONFIGMG_Register_Enumerator | Registers the enumerator handler for the device node. |
CONFIGMG_Set_Bus_Info | Sets bus information in the devnode. |
There are these enumeration messages.
Message | Description |
---|---|
CONFIG_ENUMERATE | Directs a driver to enumerate its immediate children. This message is sent when a device is inserted or removed. |
CONFIG_FILTER | Directs a driver to process a new device or changes to the configuration of a device. |
CONFIG_REMOVE | Notifies the driver that the associated device node is being removed from the hardware tree. |
CONFIG_START | Notifies the driver that a configuration has been allocated for the device node; the driver can retrieve the configuration and begin to use it. |
CONFIG_STOP | Directs the driver to stop using its currently allocated configuration. |
CONFIG_TEST | Requests permission from the driver to invalidate the assigned configuration or remove the given device node; the driver should not grant permission if it cannot stop using the current configuration or is not prepared for the device to be removed from the system. |
The enumeration handler must return CR_DEFAULT for any messages it does not not process.
Enumerators are responsible for creating device identifiers for the devices they locate. Each identifier must be unique and be consistently the same on each system boot. The string must be constructed so that it can serve to identify a unique entry in the registry. The string must start with the enumerator's name followed by a backslash. For example, the ISA Plug and Play enumerator starts all device identifiers with "ISAPNP\".