如何判断硬盘是移动硬盘?

解决方案 »

  1.   

    for i:=0 to 25 do begin
      if ((d shr i) and 1=1) then begin
       sd:=chr(i+ord('A'));
       s:=s+sd+'--';
       if i<2 then s:=s+'软盘驱动器'+#10
       else begin
        case  GetDriveType(pchar(sd+':\')) of
         0: s:=s+'驱动器形式不能确定';
         1: s:=s+'根目录不存在';
         2: s:=s+'可移动的驱动器';
         3: s:=s+'硬盘驱动器';
         4: s:=s+'远程(网络)驱动器';
         5: s:=s+'CD-ROM驱动器';
         6: s:=s+'虚拟驱动器';
         end;
    END;