Thanks max, I will check out the code in the morning, as I am a bit Buggered
right now.

Cheers, and thanks for your help

Chris

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Max Nilson
Sent: Tuesday, 5 October 1999 18:37
To: Multiple recipients of list Delphi
Subject: RE: [DUG]: Executing a simple program and capturing the output


Chris Crowe asked:

> Are you meaning to change the COM Controls STDIN?, I didn't
> know they had one...

All Win32 executables have a standard in, out and error. Its just that in
most Win32 executable these have no meaning and are just redirected to the
nul device. A COM control will have the standard handles available
depending on its type, that is, either in process one will have the parent
executables, and out of process one will have ones refering to the nul
device.

> Do you have any idea of how to do these things?, I really like
> the idea of a pipe....

This is a failry bug chunk of code straight from the MSDN examples, so
rather than waste everyone times I have mailed you the source code. If in
C but is very clean and should show you the relevant Win32 API's required
to redirect a child processes standard handles to anoymous pipes.

> Please Please some code....

On its way right now...

I would recommend anyone working on Win32 have a copy the the basic MSDN
subscription in their company. Its is the best reference document that
money can buy when it comes to Microsoft's evolving view of the world, and
the latest versions are all in HTMLHelp format and a joy to search through
looking for obscure information.

Cheers, Max.


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to