Re: Writing to others Process STDIN



On Mon, 20 Jun 2005 19:05:27 +0200, Egon Rath
<egon-nospam@xxxxxxxxxxx> wrote:

>Hi,
>
>i am trying to write to a other's process standard input. I've played
>around with the OpenProcess and DuplicateHandle Functions - without
>any success.
>
>below is my test code (compiles but doesn't work)
>

Hi,

first of all, thank you for answering.

Ok, the part with the source/target is now clear. I've read in the
MSDN Documentation to DuplicateHandle that it only works for
duplicating Console Input/Output Handles if the Process is a child of
the calling process where the Duplication should occur.

The situation i need to master is as follows:

We are running a application which consists of about 30 open command
line windows where in each of this windows runs a Java Process.
Sometimes when a complex bug in this application occurs it's necessary
to step through all of these windows, enlarge the console buffer to as
many lines as possible, then press Ctrl-Break, mark the entire output
(Java Stack Trace), copy each of the output to a text file ... and so
on....

I want to develop a way of automating this process. Do you have any
ideas how i could do this with the Win32 API?

Thanks, Egon


.



Relevant Pages

  • Re: Writing to others Process STDIN
    ... >>around with the OpenProcess and DuplicateHandle Functions - without ... > line windows where in each of this windows runs a Java Process. ... > to step through all of these windows, enlarge the console buffer to as ...
    (microsoft.public.vc.language)
  • Re: subprocess.Popen inheriting
    ... Windows, you need to call DuplicateHandle for it. ... There's also the complicating factor that the handles in windows aren't   ... This still doesn't answer whether the file descriptor return by ...
    (comp.lang.python)
  • Re: subprocess.Popen inheriting
    ... Windows, you need to call DuplicateHandle for it. ... There's also the complicating factor that the handles in windows aren't the ... It would be nice if Python created pipes that are properly inheritable by ...
    (comp.lang.python)