Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How does Windows determine device categorization in "Device Manager"?

For instance, Device Manager lists such categories as "Imaging devices", "Keyboards", "Sound, video, and game controllers", etc. -- how does Windows "know" to put a device into any of these categories?

How does Windows decide which device is which, and then file it under a category?

For reference, I understand Windows uses hardware and vendor IDs to "know" what a device is, and that the visible naming of a device stems from the initial INF file. But from my understanding, INF files don't define the category or type of device, hence why I'm wondering how Windows is making the distinction.

share|improve this question
    
How about a pointer on the downvote reasoning? –  Coldblackice Jul 3 '13 at 17:32

2 Answers 2

up vote 2 down vote accepted

It's basically the device driver's responsibility. Windows represents devices by device objects. Each device object has a device type, which is stored in the DeviceType member of its DEVICE_OBJECT structure. The device type represents the type of underlying hardware for the driver. See the source page below as well as related MSDN documentation about kernel and user-mode drivers, the Windows Driver Model (WDM) architecture etc.

Source

share|improve this answer
    
Brilliant -- thanks! –  Coldblackice Jul 5 '13 at 18:31

Your understanding is incorrect - INF files do define the category where a device will go in Device Manager. Windows categorizes devices based on the Class and ClassGuid entries in the INF file used to install the device.

For example, go to Device Manager -> Keyboards -> HID Keyboard Device (assumed) -> right-click -> Properties -> Details tab -> Property dropdown -> Device class guid. You should see {4d36e96b-e325-11ce-bfc1-08002be10318} for the device class GUID. This matches the GUID for Keyboard in the MSDN link "System-Defined Device Setup Classes Available to Vendors" http://msdn.microsoft.com/en-us/library/ff553426%28v=vs.85%29.aspx

You can even create your own Device Manager categories. "Creating a New Device Setup Class" http://msdn.microsoft.com/en-us/library/ff540189%28VS.85%29.aspx But this is generally frowned upon, and you should use existing Class GUIDs where appropriate. For example, if you chose to use a different Class GUID for a keyboard, (I think) the OS would not recognize the keys that were pressed, even though the OS recognizes the device itself (i.e. it enumerated, it sends data, but the data doesn't go into the system's keyboard buffers)

share|improve this answer
    
Awesome information, thanks! –  Coldblackice Aug 30 '13 at 19:33
    
ajs410 is correct. There is a DeviceType member in the Device Object as Karan described, but except for a few device types that have been around for a long time, it's sort of historical. –  Jamie Hanrahan Aug 5 at 20:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.