检测驱动器类型

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject); var
typ: Integer;
s: string;
begin
s := 'C:/';
typ := GetDriveType(PChar(s));
if Typ <> 0 then case typ of
DRIVE_REMOVABLE:
begin
ShowMessage('Drive Removable / Diskette');
end;
DRIVE_FIXED:
begin
ShowMessage('Drive fixed / Festplatte');
end;
DRIVE_CDROM:
begin
ShowMessage('CD ROM Drive');
end;
DRIVE_RAMDISK:
begin
ShowMessage('RAM Drive');
end;
DRIVE_REMOTE:
begin
ShowMessage('Remote Drive / Netzlaufwerk');
end;
end;
end;
 

Similar threads

后退
顶部