delphi获得硬盘所有分区


本文整理自网络,侵删。

 //delphi获得硬盘所有分区

procedure GetDrives(Drives: TStrings);
var
Drive: Char;
DriveLetter: string[4];
begin
for Drive := 'A' to 'Z' do
begin
DriveLetter := Drive + ':\';
if GetDriveType(PChar(Drive + ':\')) = DRIVE_FIXED then
Drives.Add(DriveLetter);
end;
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
GetDrives(ListBox1.Items);
end;

相关阅读 >>

Delphi 从字符串中提取单词、从字符串中提取汉字的函数

Delphi idhttp 设置cookie 和访问后读取cookie 值

Delphi瞬间消除无用托盘图标(刷新托盘)

Delphi sysutils.stringreplace - 替换

Delphi实现保存和读取图片的方法

Delphi webservices 字节数组 base64编码

Delphi实现电脑端微信图片文件解密

Delphi kbmmw sampleservice/sampleclient方式传输数据集

Delphi windows 编程[21] - wm_menuselect 消息与 getmenustring 函数

减小Delphi xe5编译出来的程序体积

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...