Autor Beitrag
oroblram
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21

Win XP
Delphi 7
BeitragVerfasst: Mo 10.09.07 14:11 
Hallo zusammen

Wie kann ich mit Delphi herausfinden, welche Buchstaben noch nicht von einem Netzlaufwerk/Festplatte/sonstiges Laufwerk belegt sind?

mfg, oroblram
Kroko
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1284

W98 W2k WXP
Turbo D
BeitragVerfasst: Mo 10.09.07 14:14 
suche mal nach
GetLogicalDrives

_________________
Die F1-Taste steht nicht unter Naturschutz und darf somit regelmäßig und oft benutzt werden! oder Wer lesen kann, ist klar im Vorteil!
oroblram Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21

Win XP
Delphi 7
BeitragVerfasst: Mo 10.09.07 15:10 
Danke. Hat geholfen.

Lösung für alle, die's auch gerne wissen wollen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure Button1Click(Sender: TObject);
var
  ld : DWORD;
  i : integer;
begin
  ld := GetLogicalDrives;

  for i := 0 to 25 do begin
    if (ld and (1 shl i)) = 0 then
    begin
      Memo1.Lines.Add(Char(Ord('A') + i) + ':\');
    end;
  end;

end;