Windows Driver Kit: Device Installation
How Setup Ranks Drivers (Windows Vista and Later)
Setup assigns a rank to a driver that matches a device. The rank indicates how well the driver matches the device. A driver rank is represented by an integer that is equal to or greater than zero. The lower the rank, the better a match the driver is for the device.
The rank of a driver is a composite value that depends on how a driver is signed, the features that are supported by the driver, and the type of match between the device identification strings that are reported by a device and the device identification strings that are specified in the entries of an INF Models section of a driver INF file.
A rank is represented by a value of type DWORD and the value of the SP_DRVINSTALL_PARAMS.Rank member for a driver. A rank is sum of a signature score, a feature score, and an identifier score. A rank is formatted as 0xSSGGTHHH, where S, G, T, and H are four-bit fields and the SS, GG, and THHH fields represent the three ranking scores, as follows:
For a summary of valid driver ranks and their examples, see Driver Rank Ranges (Windows Vista and Later) and Driver Rank Example (Windows Vista and Later).
For information about the system-defined constants that can be used to extract and compare rank values, see System-Defined Driver Rank Constants (Windows Vista and Later).
For information about entries in the SetupAPI log that indicate the rank of a driver and the type of driver signature, see Driver Rank Information in the SetupAPI Log.