标题:[求助]判断驱动盘符
取消只看楼主
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
结帖率:66.67%
 问题点数:0 回复次数:2 
[求助]判断驱动盘符

const int Removable = 2; const int LocalDisk = 3; const int Network = 4; const int CDRom = 5;

ManagementObjectCollection queryCollection = getDrives();

foreach(ManagementObject mo in queryCollection) { switch(int.Parse(mo["DriveType"].ToString())) { case Removable: //removable drives imageIndex = (int)FileImages.FLOPPYDISK; break; case LocalDisk: //Local drives imageIndex = (int)FileImages.LOCALDISK; break; case CDRom: //CD rom drives imageIndex = (int)FileImages.CDDISK; break; case Network: //Network drives imageIndex = (int)FileImages.Network; break; default: //defalut to folder imageIndex = (int)FileImages.FILE_IMAGE_DEFAULT; break; } //show the drive in the ListView listView.Items.Add(mo["Name"].ToString(),imageIndex); } 在下不明白当中的API,谁给提供一下注释?

搜索更多相关主题的帖子: int const case drives CDRom 
2005-04-23 12:19
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
得分:0 
难道C里面没有API吗?
C++版的kai没来,另外三位潜水,我只有来这里了。
2005-04-23 13:53
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
得分:0 

ManagementObjectCollection queryCollection = getDrives();

foreach(ManagementObject mo in queryCollection) { switch(int.Parse(mo["DriveType"].ToString()))

2005-04-23 14:57



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-16460-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.393394 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved