Device Interface Class GUID和Device Setup Class GUID
20180516
两者是不一样的。
There seems to be confusion in this thread about two completely different classes so let me try to clear this up.
A Device Interface Class GUID is the “name” for a functional contract implemented by a device. It is very much the same concept as a IID in COM. A single instance of a device can implement many different functional contracts and therefore have many interfaces with different interface classes.
The Device Setup Class GUID (also referred to as the Installer Class GUID) is a “name” for the installer that should be selected to install a specific INF.
The two concepts are completely unrelated but often confused because they both have “Class GUID” as part of their name.
There is not definitive list of Interface Class GUIDs, and indeed, anyone can define a new one. There are of course some well-known interface classes defined by Windows. I do not know of a list of these either but they tend so to documented with the documentation that describes the functionality of the contract.
In the Windows Runtime device related classes, the class that expose the functionality that you want to use typically has a GetDeviceSelector() function. This selector returns a AQS string that can be used when enumerating devices with Windows.Devices.Enumeration.DeviceInforamtion. This avoids having to know the GUIDs or other details that are needed to filter devices that can be used to activate the functionality that is to be used.
SetupDiGetClassDevs function
注意!!
The caller of SetupDiGetClassDevs must delete the returned device information set when it is no longer needed by calling SetupDiDestroyDeviceI