Prev: Vista and CSIDL_COMMON_APPDATA - readonly and _hidden_ directory
Next: How to use tab control in vc++ win32 api (not mfc) ??
From: Jonathan de Boyne Pollard on 3 Mar 2010 00:14 > > > 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 3 Mar 2010 02:03 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 3 Mar 2010 08:28 > >>> >>> 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 3 Mar 2010 14:26 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 3 Mar 2010 14:51
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. |