如题

解决方案 »

  1.   

    { 获得可写的驱动器列表 }function GetDrives: string;
    var
      DiskType: Word;
      D: Char;
      Str: string;
      i: Integer;
    begin
      for i := 0 to 25 do //遍历26个字母
      begin
        D := Chr(i + 65);
        Str := D + ':\';
        DiskType := GetDriveType(PChar(Str));
        //得到本地磁盘和网络盘
        if (DiskType = DRIVE_FIXED) or (DiskType = DRIVE_REMOTE) then
          Result := Result + D;
      end;
    end;
      

  2.   

    或者使用API GetLogicalDriveStrings 和 GetLogicalDrives
      

  3.   

    crossbow(La Vida Es Amor可以實現