逐一测试:
var sDrive:String;
begin
for D:=0 to 25do
begin
sDrive:=Chr(ord('A')+D)+':';
if GetDriveType(PChar( sDrive ))=DRIVE_REMOVABLE then
ShowMessage( sDrive + '是可移动盘');
end;
end;
var sDrive:String;
begin
for D:=0 to 25do
begin
sDrive:=Chr(ord('A')+D)+':';
if GetDriveType(PChar( sDrive ))=DRIVE_REMOVABLE then
ShowMessage( sDrive + '也可能是光盘);
end;
end;
[]
我也想知道