USB设备插入和移除.. [英] USB device insertion and removal..

查看:64
本文介绍了USB设备插入和移除..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,



我想写一个可以检测USB deice插入和移除的程序。

我知道我有使用一些方法...



RegisterDeviceNotification()



和DeviceChange消息。



但是我无法将两者结合起来。



所以有人可以帮我写一个简单的程序用C语言同样的。





谢谢

Hello All,

I want to write a program which can detect USB deice insertion and removal.
I know that I have to use some methods...

RegisterDeviceNotification()

and DeviceChange message.

But i am not able to combine both.

So could anybody help me to write a simple program in C for the same.


Thanks

推荐答案

请参阅一些CodeProject文章关于这个话题:

检测硬件插入和/或删除 [ ^ ],

硬件变更检测 [ ^ ],

简单的URB(USB请求阻止)监视器 [ ^ ]。



试着看一下:

http://www.codeproject.com/search.aspx?q=USB+detection+%28C+OR+C%2b%2b%29+-C%23& doctypeid = 1 [ ^ ],

http://www.codeproject.com/search.aspx?q=USB+detection+%28C+ OR + C%2B%2B%29 + -C%23安培; doctyp eid = 5 [ ^ ],

http://www.codeproject.com/search.aspx?q=USB+detection+%28C+ OR + C%2b%2b%29 + -C%23& doctypeid = 4 [ ^ ] ...



这只是关于CodeProject。还有其他网站和搜索引擎,如Google或Bing ...... :-)



-SA
Please see some CodeProject articles on the topic:
Detecting Hardware Insertion and/or Removal[^],
Hardware Change Detection[^],
Simple URB (USB Request Block) Monitor[^].

Try to look more thoroughly:
http://www.codeproject.com/search.aspx?q=USB+detection+%28C+OR+C%2b%2b%29+-C%23&doctypeid=1[^],
http://www.codeproject.com/search.aspx?q=USB+detection+%28C+OR+C%2b%2b%29+-C%23&doctypeid=5[^],
http://www.codeproject.com/search.aspx?q=USB+detection+%28C+OR+C%2b%2b%29+-C%23&doctypeid=4[^]…

This is only about CodeProject. There are other sites and search engines like Google or Bing… :-)

—SA


这篇关于USB设备插入和移除..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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