windows – How does PnP manager determine the appropriate function driver?
when bus driver detect and report PDO machine PnP supervisor ship a number of IRP_MJ_PNP
to PDO machine. together with IRP_MN_QUERY_ID
for get System Identification Strings
then formated registry key path in type
REGISTRYMACHINESYSTEMCurrentControlSetEnum
in place
string returned by machine for BusQueryDeviceID
and in place
string returned by machine for BusQueryInstanceID
(Parameters.QueryId.IdType
)
this key opened or created. then was question for BusQueryHardwareIDs
and BusQueryCompatibleIDs
. results of this question saved in HardwareID
and CompatibleIDs
REG_MULTI_SZ
values.
after which PnP supervisor search for Service
REG_SZ
worth beneath this key – if it exist already – the motive force ( REGISTRYMACHINESYSTEMCurrentControlSetServices
) loaded and it AddDevice
known as with this PDO. if this worth but not set – was search through put in inf information in system – for finest match HardwareID
and CompatibleIDs
. if discovered driver – consequence saved beneath Service
REG_SZ
worth, for not search subsequent time