如何获取有关已在系统中添加或删除的设备的其他信息 [英] How can I get additional information about which device has been added to or removed from the system

查看:129
本文介绍了如何获取有关已在系统中添加或删除的设备的其他信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当系统(平板电脑)已添加到系统或从系统中删除时,系统会广播DBT_DEVNODES_CHANGED设备事件。要广播此设备事件,系统将使用WM_DEVICECHANGE消息,其中wParam设置为DBT_DEVNODES_CHANGED且lParam设置为零。如何知道有关在系统中添加或删除哪个设备的其他信息。

The system broadcasts the DBT_DEVNODES_CHANGED device event when a device(a tablet PC) has been added to or removed from the system.To broadcast this device event, the system uses the WM_DEVICECHANGE message with wParam set to DBT_DEVNODES_CHANGED and lParam set to zero.How can I know additional information about which device has been added to or removed from the system.

推荐答案

您可以使用应提供Devicename,ID的WMI。 ..



使用SELECT * FROM Win32_USBControllerDevice查看WMI,它应该将您的设备放在集合中,基本上所有参数窗口都知道它。
You can work with the WMI it should provide Devicename, ID ...

Look in the WMI with "SELECT * FROM Win32_USBControllerDevice" it should have your device in the collection and basicly all parameter windows knows about it.


这篇关于如何获取有关已在系统中添加或删除的设备的其他信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆