C#如何在usb插入计算机时触发应用程序? [英] C# How to trigger a application when a usb plug into the computer?
本文介绍了C#如何在usb插入计算机时触发应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在USB设备插入计算机时运行应用程序,我认为它应该由Windows服务实现,你能给我一些关于它的提示或示例。我是服务的初学者。谢谢
I want to run a application when a USB device plug into the computer,I think it should be implemented by Windows Service,Can you give me some tips or examples about it.I am a beginner for service.Thanks
推荐答案
CodeProject是你的朋友:[ ^ ]
CodeProject is your friend: [^]
"This article describes my C# class called DriveDetector which will allow your program to receive a notification when a removable drive (such as a flash drive) is inserted or removed. It also supports notifications about pending removal of such a device and cancelling this removal."
这篇关于C#如何在usb插入计算机时触发应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文