SPECIAL OFFER        Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!

⤷ Show list of valid drives

Use GetLogicalDriveStrings function for solving of this problem. This function returns point to a string, which has such representing: c:\#0d:\#0#0.

procedure TForm1.Button1Click(Sender: TObject);
var
  MyStr: PChar;
  i, Length: Integer;
const
  Size: Integer = 200;
begin
  GetMem(MyStr, Size);
  Length:=GetLogicalDriveStrings(Size, MyStr);
  for i:=0 to Length-1 do
  begin
    if (MyStr[i]>='a')and(MyStr[i]<='z') then
      Memo1.Lines.Add(MyStr[i]+':\');
  end;
  FreeMem(MyStr);
end;
More for developers
Databases for Amazon Associates
Amazon Categories
Amazon Nodes