From: Jonathan de Boyne Pollard on
>
>
> Strange hang problem with ReadFile.
>
You're leaving the write end of a pipe open. Since your variable names
are confusing, and you appear to be duplicating handles for the fun of
it, I've not looked to see which handle(s) this is.

From: IlyaK on
The write end of the pipe gets closed at the end. Is there a problem
with it open?
All that handle duplication came from the Microsoft's example. I
didn't invent it. If there is a better way, I'll be happy to use it.


On Mar 2, 9:14 pm, Jonathan de Boyne Pollard <J.deBoynePollard-
newsgro...(a)NTLWorld.COM> wrote:
> > Strange hang problem with ReadFile.
>
> You're leaving the write end of a pipe open.  Since your variable names
> are confusing, and you appear to be duplicating handles for the fun of
> it, I've not looked to see which handle(s) this is.

From: Jonathan de Boyne Pollard on
>
>>>
>>> Strange hang problem with ReadFile.
>>>
>>
>> You're leaving the write end of a pipe open. Since your variable
>> names are confusing, and you appear to be duplicating handles for the
>> fun of it, I've not looked to see which handle(s) this is.
>>
> The write end of the pipe gets closed at the end. Is there a problem
> with it open?
>
Yes, and it's the obvious one: The read end won't see EOF until it is
closed.

> All that handle duplication came from the Microsoft's example. I
> didn't invent it. If there is a better way, I'll be happy to use it.
>
Cargo cult programming is never the answer. You need to understand why
the example is doing what it is doing. At the very least you need to
read the comments in the example, including the ones that you didn't
copy. Now that I know that you copied this from an example in a MSKB
article, I know what to look for, and I find that the example actually
warns about the error that you are making.

From: IlyaK on
Can you please point out where the error is?
Obviously I don't see it.


> Cargo cult programming is never the answer.  You need to understand why
> the example is doing what it is doing.  At the very least you need to
> read the comments in the example, including the ones that you didn't
> copy.  Now that I know that you copied this from an example in a MSKB
> article, I know what to look for, and I find that the example actually
> warns about the error that you are making.

From: IlyaK on
Can you please point out where the error is?
Obviously I don't see it.


> Cargo cult programming is never the answer.  You need to understand why
> the example is doing what it is doing.  At the very least you need to
> read the comments in the example, including the ones that you didn't
> copy.  Now that I know that you copied this from an example in a MSKB
> article, I know what to look for, and I find that the example actually
> warns about the error that you are making.