Posted by Andrew Pegum (194.125.50.210) on July 18, 2000 at 16:56:03:
In Reply to: A Serious Doubt posted by Rajeev Menon on July 17, 2000 at 11:19:21:
Rajeev,
I don't know a whole lot about pipes, but I worked with file-mapping a while ago, on Win32. It's very neat for inter-process communication, mapping a piece of virtual memory as a file which can be accessed through a name or handle. Using a mutex to synchronise access to it, it can be used for any amount of data, with Read/WriteFile() (I think).
HTH
Andrew
: Friend,
: For the last some days, i'm facing a problem while woking with Win-32 APIs. I will explain the
: situation:
: I have a program which in turn gives a "CreatePocess" to another external executable. I
: now want to redirect the I/O of the external program to an anonymous pipe (not named pipe). This
: pipe I will be creating in the parent process and giving it in the redirect handle of
: CreateProcess. Now I am reading the output handle and writing the input handle from the parent
: process. For writing into the handle i'm using "WriteFile" and "ReadFile" to read the output
: handle. The WriteFile is writing the buffer into the pipe and coming out after that. But the
: ReadFile is waiting infinitely till the whole external program gets over. Then atlast I'm getting
: the whole output together.
: What I want is that the "ReadFile" should come out after a single read and should not
: wait in the read. What do I do for that ? I cannot change the anonymous pipe to a named pipe.
: Thankx,
: Rajeev... INDIA.