我怎样才能检测到USB断开事件? (在Windows,.NET C#应用程序) [英] How can I detect a USB disconnect event? (Windows, .NET C# application)
问题描述
目前我该怎么做,这是对USB设备的屏蔽列表(专门为我的工作与设备屏蔽)我投票,如果它的存在,我继续,如果没有,那么我通知用户设备不连接。通过USB外设控制器芯片制造商的.NET库为我提供的方法获取USB设备列表。
Currently how I do this is I poll for a masked list of USB devices (masked specifically for the device I'm working with) and if it's there, I continue, if not then I notify the user that the device is not connected. The method for getting a list of USB devices is provided for me through a USB peripheral controller chip manufacturer's .NET library.
有一个事件在某处的USB设备断开?
Is there an event somewhere for a USB device disconnect?
推荐答案
我最终使用这样的:<一href="http://msdn.microsoft.com/en-us/library/aa363480(VS.85).aspx">http://msdn.microsoft.com/en-us/library/aa363480(VS.85).aspx
和遵循这样的:<一href="http://www.$c$cproject.com/KB/system/DriveDetector.aspx">http://www.$c$cproject.com/KB/system/DriveDetector.aspx
这篇关于我怎样才能检测到USB断开事件? (在Windows,.NET C#应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!