阅读:2325回复:2
SetupDiGetClassDevs 的第一个参数
各位兄弟,关于第一个参数,我看了MSDN,结果还是有些不明白.
例如,MSDN中说,DEVICE CLASSES中,系统指定{4d36e978-e325-11ce-bfc1-08002be10318} 是SERIAL、PARALLEL共用的GUID, 但是,有些机器把MODEM、FIR映射成COM3,COM4等,我在枚举COMM口时,就会判断错误,而我用DDK中指定的 DEFINE_GUID(GUID_DEVINTERFACE_COMPORT,0x86e0d1e0L, 0x8089, 0x11d0, 0x9c, 0xe4, 0x08, 0x00, 0x3e, 0x30, 0x1f, 0x73)就能得到普通的RS232C串口。 请各位不吝赐教,将使用经验公布出来,大家一起讨论。 |
|
沙发#
发布于:2004-01-29 16:12
HDEVINFO SetupDiGetClassDevs( IN LPGUID ClassGuid, OPTIONAL IN PCTSTR Enumerator, OPTIONAL IN HWND hwndParent, OPTIONAL IN DWORD Flags );
ClassGuid Optionally points to a class GUID for a setup class or an interface class. If the DIGCF_DEVICEINTERFACE flag is set, ClassGuid represents an interface class; otherwise, ClassGuid represents a setup class. If the DIGCF_ALLCLASSES flag is set, this parameter is ignored and the resulting list contains devices of all installed classes. 看来是我没看仔细,在这里发这个烂贴,真是抱歉,还请斑竹原谅。 |
|
板凳#
发布于:2004-01-29 15:58
Device setup classes provide a mechanism for grouping devices that are installed and configured in the same way. A setup class identifies the class installer and class co-installers that are involved in installing the devices that belong to the class. For example, all CD-ROM drives belong to the CDROM setup class and will use the same co-installer when installed.
Device interface classes provide a mechanism for grouping devices according to shared characteristics. Rather than tracking the presence in the system of an individual device, drivers and user applications can register to be notified of the arrival or removal of any device that belongs to a particular interface class. |
|