can someone explain to me (or give sme pointers) as to the sequence of steps
the OS performs when a new device is added.
How does the pnp manager finally detect which driver image file in the disk
is to be loaded for that device.
Here is what I know (please correct me if I am wrong)
the device sends the PNP manager an unique string which identifies the
device. The OS parses this sting and then tokenizes this sting and tries to
find a matching driver file from the INFs it has. If there is an exact match
good, else it tries the nearest possible match.
Now if this is correct, can someone elaborate these steps please.
–
“amitr0” wrote in message news:xxxxx@ntdev…
…
>Here is what I know (please correct me if I am wrong)
>
>the device sends the PNP manager an unique string which identifies the
>device.
Correction… The bus driver queries the device for identification data it provides.
PnP buses like PCI or USB have standards for such data.
The bus driver makes up a device id string from this data. This string has
prefix of the enumerator (PCI, USB.…, ROOT) and opaque tail.
Also, it tries to make so called compatible IDs if available.
>The OS parses this sting and then tokenizes this sting and tries to
>find a matching driver file from the INFs it has. If there is an exact match
>good, else it tries the nearest possible match.
Correction: the OS does not parse or tokenize the string (besides of the enumerator prefix).
The part after enumerator name is opaque - as it appears in the INF file.
Bus drivers ensure that IDs do not contain troublesome characters like backslash or space.
Finding “nearest match” is a long story - described in the DDK documentation in details.
This depends on whether the ID string in the INF file matches the “primary” (most specific) id,
or one of compatible IDs; and if the driver is signed.
>Now if this is correct, can someone elaborate these steps please.
Please read the DDK documentation…
–
- amitr0
>the device sends the PNP manager an unique string which identifies the
device.
No. PnP Manager asks for this string. Bus driver sends a response.
The OS parses this sting and then tokenizes this sting and tries to
find a matching driver file from the INFs it has
This is done only if the device registry key is not set up yet. Otherwise, the
driver name is already known and is in the device registry key.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com