如何在c#中启用特定的usb端口。 [英] How can I enable a specific usb port in c#.

查看:209
本文介绍了如何在c#中启用特定的usb端口。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目我必须禁用所有非常简单的端口,我想要的是当任何usb大容量存储设备(笔式驱动器)连接到任何默认禁用的usb端口时,将检查连接的设备是否已注册或新设备是否已注册然后启用端口其他注册。



我尝试过:



我现在尝试的实际上是启用所有端口,但我想要特定的

I my project i have to disable all the port which is very easy,what i want is when any usb mass storage device(Pen drive) get connected to any of the usb port which is by default disabled in my case, will check whether the connected device is registered or a new device if it is registered then enable the port else register.

What I have tried:

What i tried till now is actually enabling all the port ,but i want specific

推荐答案

Ummm ....如果您禁用USB集线器,您无法禁用特定端口IIRC,您也无法分辨任何插入任何端口的内容。要检测插入,必须启用USB集线器!



没有必要禁用任何东西!
Ummm.... if you disable the USB hub, you can't disable a specific port IIRC, you also cannot tell that anything was plugged into any of the ports. To detect an insertion, the USB hub has to be enabled!

There is then no point to disabling anything!


这篇关于如何在c#中启用特定的usb端口。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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