The Big Picture: The Name Tag at the Door

When a guest arrives at a conference, they wear a name tag. The tag might say:

  • "Anna Smith, Marketing, Table 4" (very exact), or
  • "Guest" (very general).

The host uses the tag to decide where to seat the person. A very exact tag lets the host give a special welcome. A general tag only lets the host give a standard welcome.

Devices do the same thing. When a bus driver finds a device (Section 2), the device hands over name tags. Windows uses those tags to pick a driver. There are two kinds:

Tag typeLike the...Meaning
Hardware IDsExact tag: name, team, table"I am exactly this model and revision"
Compatible IDsGeneral tag: "Guest""I am at least this kind of thing, and a general driver can run me"

3.1 Hardware ID Format (VID/PID for USB, PCI\VEN_&DEV_)

What it is: A hardware ID is a text string that names a device model. It begins with the bus name, then a few codes in a fixed pattern. A device usually reports a list of hardware IDs, from the most exact to the less exact.

The codes inside come from the maker of the chip. Two numbers are especially common:

Short nameLong nameMeaning
VID / VENVendor IDA number for the company (for example, Intel, Realtek, Logitech)
PID / DEVProduct ID / Device IDA number for the product from that company

Companies register their vendor number with the group that controls the standard (the PCI-SIG for PCI, the USB Implementers Forum for USB). That is how two companies never use the same vendor number.

PCI example:

PCI\VEN_8086&DEV_1912&SUBSYS_86941043&REV_06
PCI\VEN_8086&DEV_1912&SUBSYS_86941043
PCI\VEN_8086&DEV_1912&CC_030000
PCI\VEN_8086&DEV_1912
PCI\VEN_8086&CC_0300

(The numbers above are an illustration of the pattern. Your PC will show different ones.)

Read the first line piece by piece:

PieceMeaning
PCI\The device is on the PCI bus
VEN_8086Vendor 8086 (in hexadecimal; that code belongs to Intel)
DEV_1912The device number: a specific chip from that vendor
SUBSYS_...The subsystem: who built the card or board around that chip (for example, a laptop maker)
REV_06The revision: the version of the chip
CC_030000The class code: what kind of device it is (here, a display controller)

Notice that the list goes from long and exact (with subsystem and revision) to short and general (only vendor and class).

USB example:

USB\VID_046D&PID_C52B&REV_2407&MI_00
USB\VID_046D&PID_C52B&MI_00
PieceMeaning
USB\The device is on the USB bus
VID_046DVendor ID
PID_C52BProduct ID
REV_2407Revision of the device
MI_00Multiple Interface number: one USB device with several parts (for example, a keyboard part and a mouse part in one dongle) gets one ID per part

Other buses follow the same pattern with their own names: ACPI\PNP0303 is a standard keyboard, HDAUDIO\FUNC_01&VEN_10EC&DEV_0256 is a sound chip on the "HD Audio" bus, and SWD\... or ROOT\... names are software-made devices.

Hexadecimal. The codes use hex: digits 0-9 and letters A-F. It is just a short way to write numbers. 8086 is a number that happens to be easy for people to remember, because it was the name of an old Intel chip.

Want to look up a code? Search for the vendor and device code on the web, for example "PCI VEN_8086 DEV_1912". Websites that collect these lists will tell you the maker and model. This is the best way to identify an "Unknown device" (see the Lab).

3.2 Compatible IDs (Fallback Generic Driver Matching)

What it is: A compatible ID is a general description. It does not name the exact model. It says "I follow this standard," so any driver for that standard can run me.

Examples of the pattern:

USB\Class_03&SubClass_01&Prot_01     (a keyboard that follows the standard)
USB\Class_03&SubClass_01
USB\Class_03
USB\COMPOSITE
PCI\CC_0C0330                        (a standard USB 3 controller)

Here Class_03 means "Human Interface Device" (HID), the standard family for keyboards, mice and game controllers. Any HID driver can run it.

Why this matters. The reason a brand-new USB mouse works the second you plug it in, without installing anything, is compatible IDs. Windows has a built-in driver for "any HID mouse." It does not know your mouse's exact model, but it does not need to.

Your new USB mouse says:
   Hardware ID:    USB\VID_1234&PID_5678   (nobody has a driver for this yet)
   Compatible ID:  USB\Class_03&SubClass_01&Prot_02  (I am a standard mouse)

Windows:  "No driver for that exact model. But I have a generic
           mouse driver for that standard. Use it."

Generic vs specific driver:

Driver typeMatched byWhat you get
Specific (maker's driver)Hardware IDAll features: extra buttons, lighting, tuning tools
Generic (built into Windows)Compatible IDBasic features only, but it works at once

A familiar example: a graphics card that uses the "Microsoft Basic Display Adapter" is running on a compatible-ID fallback. The screen works, but at low resolution and with no 3D speed. When you install the maker's driver (matched by hardware ID), you get the full features.

Where the standards come from: Class codes are written down by the standards groups (USB-IF, PCI-SIG). Because everybody agrees on them, one Microsoft driver can control thousands of products from different companies. That is the foundation of "plug and play."

3.3 ID Ranking / Priority Order

What it is: A device can match more than one driver at the same time. So Windows needs a way to say "this match is better." It does this by giving each possible match a rank (a score), where a lower number means a better match.

The simple rule:

A match on a hardware ID always beats a match on a compatible ID.

Inside each list, the earlier line (the more exact one) beats the later line.

Better match  ──────────────────────────────────────►  Worse match

 Hardware ID #1   Hardware ID #2  ...  Compatible ID #1   Compatible ID #2 ...
 (most exact)     (less exact)         (standard-based)   (most general)

Windows ranks the "match" between a driver's INF file and the device's IDs. An INF file is a small text file that comes with a driver and lists which IDs the driver supports (Chapter 13 explained INF files). Each line in the INF names IDs. The PnP manager compares each ID the device reported against each ID the INF supports.

How the ranking looks in practice (the exact numbers may be different, so treat them as an idea only):

Match foundRank idea
Hardware ID, first (most exact) in the device's listBest (lowest)
Hardware ID, later in the device's listA bit worse
Compatible ID, earlyWorse than every hardware ID match
Compatible ID, lateWorst

Microsoft's documentation describes the ranks in ranges (hardware ID matches fall in a low range, compatible ID matches in a higher range). The exact numbers are not important for daily use.

What happens when two drivers have the same rank? Windows then looks at other things: whether the driver is signed and by whom, the date, and the version. Section 4 explains this in full.

Seeing it yourself. In Device Manager, open a device's Properties → Details tab. The Property drop-down has these entries:

PropertyWhat it shows
Hardware IdsThe list of exact IDs, best first
Compatible IdsThe list of general IDs, best first
Matching Device IdThe ID that the chosen driver matched on

Mock-up of what you will see:

Property:  [ Hardware Ids              v]
Value:
   PCI\VEN_10EC&DEV_8168&SUBSYS_816810EC&REV_15
   PCI\VEN_10EC&DEV_8168&SUBSYS_816810EC
   PCI\VEN_10EC&DEV_8168&REV_15
   PCI\VEN_10EC&DEV_8168
   PCI\VEN_10EC&DEV_8168&CC_020000
   PCI\VEN_10EC&DEV_8168&CC_0200
   ...

(The line above is an invented example in the usual pattern.)

Choose Compatible Ids in the same drop-down. On some devices it is empty, because there is no general driver for them.

You can also copy the value: Right-click the value and choose Copy. Paste it into a search box to find the right driver.

Summary

TermPlain meaning
Hardware IDAn exact name tag for one model (bus, vendor, device, subsystem, revision)
VID / VENVendor ID: the company
PID / DEVProduct or device ID: the model
SubsystemWho built the card around the chip
RevisionThe chip's version
Compatible IDA general tag: "I follow this standard"
Generic driverA built-in driver that matches by compatible ID
RankA match score; lower is better
RuleHardware ID match beats compatible ID match
Details tabWhere you can read these IDs