Reply-To: "Rick Betting" From: "Rick Betting" Newsgroups: borland.public.delphi.winapi References: <3af28d8c$1_1@dnews> Subject: Re: How to get the output of a console application? Date: Fri, 4 May 2001 17:04:31 +0200 Lines: 29 Organization: Online Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 212.187.40.84 Message-ID: <3af2c5d1$1_2@dnews> X-Trace: dnews 988988881 212.187.40.84 (4 May 2001 08:08:01 -0700) Path: dnews Xref: dnews borland.public.delphi.winapi:134373 You can redirect the output handle. Create a pipe (Anonymous or named). Run the console app using CreateProcess. Use the next members of StartupInformation: STARTUPINFO; StartupInformation.dwFlags := STARTF_USESTDHANDLES; StartupInformation.hStdOutput := PipeHandle; StartupInformation.hStdError := GetSTDHandle(STD_ERROR_HANDLE); StartupInformation.hStdInput := GetSTDHandle(STD_INPUT_HANDLE); Now you can read the output from the pipe. -- Rick Betting rick@ATonlinegroepDOT.nl (Remove AT and DOT ) I don't like spammers so send your spam to abuse@iname.com "Gary" schreef in bericht news:3af28d8c$1_1@dnews... > > I want to run a console application in my windows app,and get any of its output in time(right after the output operation is done) to show it in my TMemo control. > How can I do it?