Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Cmd prompt hook? (https://www.delphipraxis.net/141235-cmd-prompt-hook.html)

Razor 5. Okt 2009 14:37


Cmd prompt hook?
 
Hello All,

Basically I am creating a program that uses the command prompt to execute some commands, its just a delphi program to return anything that comes from the console window.Any information would be 10X thankfull.I need some information as i am making a terminal sort of like mac osx has.Like but not the same.

Many thanks

alleinherrscher 5. Okt 2009 14:58

Re: Cmd prompt hook?
 
Hi, i think that you should use pipes for this problem. You can find some source in this forum, for example:

http://www.delphipraxis.net/internal...pipereadthread

and here:

http://www.delphipraxis.net/download.php?id=10863

Razor 5. Okt 2009 15:18

Re: Cmd prompt hook?
 
Thank you very much...

tirex1 6. Okt 2009 08:13

Re: Cmd prompt hook?
 
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo.
Hat jemand eine Idee, warum ich unter Windows 7 mit Delphi 2010 folgendes Resultat, siehe Screenshot, bekomme?

Gruß
tirex1

Klaus01 6. Okt 2009 08:25

Re: Cmd prompt hook?
 
Guten Morgen,

schaut es wie zwei TEdit und ein TMemo.
Das TMemo wird dazu benutzt die Ausgabe
der Kommandos darzustellen.

Im Post #2 sollte eigentlich stehen wie
das zu bewerkstelligen ist.

Grüße
Klaus

DeddyH 6. Okt 2009 08:29

Re: Cmd prompt hook?
 
Könnte es sein, dass das an Unicode liegt? Der Ausgabestring müsste als AnsiString deklariert und ggf. noch mit OEMToChar nachbearbeitet werden. Aber da ich kein Delphi 2010 habe, sind das nur Vermutungen.

Razor 6. Okt 2009 08:30

Re: Cmd prompt hook?
 
The example works with windows 7 x64 one that is shown on swissdelphicenter. :)

tirex1 6. Okt 2009 09:21

Re: Cmd prompt hook?
 
Danke Euch. Der Hinweis mit Unicode war korrekt. Des Rätsels Lösung ist PAnsiChar.

Gruß
tirex1


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:48 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz