Autor Beitrag
Tilo
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1098
Erhaltene Danke: 13

Win7 geg. WInXP oder sogar Win98
Rad2007
BeitragVerfasst: Sa 24.04.04 20:59 
Meine Frage ist, so denke ich, von elementarer Bedeutung:

Wie findet man heraus, was für ein Laufwerk(Festplatte, 3,5'', CD,DVD) das an vom Anwender angegebene Laufwerk(z.b. 'E:\')?


Zuletzt bearbeitet von Tilo am So 25.04.04 10:37, insgesamt 1-mal bearbeitet
Pierre
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 138

Win 98se und XP prof
D5Pers und D7Prof
BeitragVerfasst: Sa 24.04.04 23:03 
Hallo,
mit
ausblenden Quelltext
1:
LWt:=getdriveType(LW);					

mit z.B. LW:='E:';

bekommst Du in LWt folgende Integer-Werte:
1 -> kein Laufwerk
2 -> Disk
3 -> Festplatte
4 -> Netzwerk
5 -> CD/CDR/DVD
6 -> Ram-Drive

Gruß Pierre
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 24.04.04 23:08 
An sich nichts auszusetzen, @Pierre, aber anstelle dieser Integer-Werte, deren Bedeutung man ja dann doch irgendwann vergisst und nachschlagen muss, würde ich die entsprechenden Konstanten wählen. ;) klick
Pierre
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 138

Win 98se und XP prof
D5Pers und D7Prof
BeitragVerfasst: Sa 24.04.04 23:35 
@ MathiasSimmack: richtig und wenn er das LWt in ein Array of Integer hineinnimmit, kann er gleich alle Volumina - Befehle für die Laufwerke über das array - Index abfragen.

Gruß Pierre
Tilo Threadstarter
ontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 1098
Erhaltene Danke: 13

Win7 geg. WInXP oder sogar Win98
Rad2007
BeitragVerfasst: So 25.04.04 10:36 
Danke für die Hilfe!
Ein Lob an alle Delphi-Forum-User!