开发者

Real name (Full name) of USB device?

开发者 https://www.devze.com 2023-01-30 06:37 出处:网络
DriveInfo[] mydrives = DriveInfo.GetDrives(); if (mydrive.DriveType == DriveType.Removable) 开发者_开发问答in this way i get all the devices that connected to my machine

DriveInfo[] mydrives = DriveInfo.GetDrives();

 if (mydrive.DriveType == DriveType.Removable)  
开发者_开发问答

in this way i get all the devices that connected to my machine and their name : mydrive.Name

can i know which kind of device is each one of them?- like DOK , external HDD and so on..... or to get their real name like- MyBook (the name of the external HDD)- it will also help me a lot.


Seen here on MSDN:

You can get the Volume Label from the DriveInfo : Drive_Info.VolumeLabel

Another useful link about all information available from DriveInfo.

0

精彩评论

暂无评论...
验证码 换一张
取 消