如何检测USB记忆棒何时连接和断开连接 [英] How to Detect When Usb stick connected and disconnected

查看:69
本文介绍了如何检测USB记忆棒何时连接和断开连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个代码块,当连接了特定的USB记忆棒时,必须运行该代码块;另一个代码块,当该USB断开连接时,必须运行.连接和断开USB记忆棒时如何检测USB的状态.

在此先感谢
Sateesh

I have a block of code which has to be run when specific USB stick is connected and another block of code which has to be run when that USB is disconnected. how to detect the status of USB when an USB stick is connected and disconnected.

Thanks in Advance
Sateesh

推荐答案

这可能有帮助:

在C#程序中检测USB驱动器的移除 [ ^ ]

http://msdn.microsoft.com/en-us/library/aa363480(VS .85).aspx [ ^ ]
this might help:

Detecting USB Drive Removal in a C# Program[^]

http://msdn.microsoft.com/en-us/library/aa363480(VS.85).aspx[^]


这篇关于如何检测USB记忆棒何时连接和断开连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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