Autor Beitrag
Freischaltcode
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Do 28.10.04 18:42 
Hi,
gibts ne Möglichkeit, in einer Normalen Delphi Anwendung die normalen DOS Befehle einzusetzen?
Als beispiel ping,
der befehl soll aufgeführt werden, und in einer TEXTBOX soll die ausgabe kommen...


Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Do 28.10.2004 um 20:17
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Do 28.10.04 19:03 
Mit Suche in: Delphi-Forum, Delphi-Library SHELLEXECUTE. ;-)

Ping ist übrigens kein Dos-Befehl, sondern eine eigenständige Konsolenanwendung. Bei echten Dos-Befehlen startest du command.com und übergibst den Befehl als Parameter.

Was du mit Textbox meinst, weiß ich nicht. Aber die Konsole ploppt von selbst auf. Wenn du die Ausgabe des Programms abfangen willst, um sie in deiner Applikation darzustellen, brauchst du einen Hook.

Gruß,
Jörg

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 28.10.04 21:06 
@Ausgabe: Oder drei Dateihandles für die Standardein- und -ausgabe sowie die Fehlerausgabe.
Dafür gehen normale Dateihandles oder Pipes ganz gut.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Do 28.10.04 21:13 
BenBE hat folgendes geschrieben:
Pipes

Äh ja, meinte ich, nicht Hook. :oops:

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Do 28.10.04 22:51 
@Chef: Obwohl Hooks auch funktionieren würden, insofern man darunter auch API-Hooks versteht.
@Rest: Werd aber auf die API-Hook-Lösung nicht eingehen, da sie für dieses Problem überdimensioniert ist.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.