Windows系统下,枚举设备的相关文章,几个主要的相关章节和函数列举如下。
【相关资料】
Device Information Sets : http://msdn.microsoft.com/zh-cn/library/ff541247(v=vs.85).aspx
Device Interface Classes : http://msdn.microsoft.com/zh-cn/library/ff541339(v=VS.85).aspx
Device Setip Classes :http://msdn.microsoft.com/zh-cn/library/ff541509(v=vs.85).aspx
【主要函数】
SetupDiGetClassDevs() //取得指定GUID相关的设备信息句柄集合,设备类型GUID在winioctl.h, wdm.h等头文件中有定义http://msdn.microsoft.com/zh-cn/library/windows/hardware/ff551069(v=vs.85).aspx
SetupDiEnumDeviceInterfaces() //枚举设备
SetupDiGetDeviceInterfaceDetail() //获取设备接口详细信息(设备路径)
IoSetDeviceInterfaceState() //设置设备的状态,enable/disable
IoGetDeviceInterfaces() //可以枚举disabled的设备
【设备信息集内部结构】
the internal structure of a device information set :