Определение типа привода
Определение типа привода
Определение типа привода procedure TForm1.Button1Click(Sender: TObject); var w: dword; Root: string; i: integer; begin w := GetLogicalDrives; Root := '#:\'; for i := 0 to 25 do begin Root[1] := Char(Ord('A') + i); if (W and (1 shl i)) > 0 then if GetDriveType(Pchar(Root)) = *** then Form1.Label1.Caption := Root; end; end; *** DRIVE_UNKNOWN The drive type cannot be determined. DRIVE_NO_ROOT_DIR The root path is invalid. For example, no volume is mounted at the path. DRIVE_REMOVABLE The disk can be removed from the drive. DRIVE_FIXED The disk cannot be removed from the drive. DRIVE_REMOTE The drive is a remote (network) drive. DRIVE_CDROM The drive is a CD-ROM drive. DRIVE_RAMDISK The drive is a RAM disk.