Re: Patch for ReadFile with NULL hEvent

2004-05-17 Thread Scott W Gifford
Eric Pouech <[EMAIL PROTECTED]> writes: [...] > > This turns out not to be the case. As long as lpOverlapped is > > supplied, a NULL hEvent will work fine and allows overlapped reads. > Could you also test it with opening a file (files and sockets > semantics are somehow different) I did, and i

Re: Patch for ReadFile with NULL hEvent

2004-05-17 Thread Eric Pouech
Eric Pouech a écrit : ...Windows doesn't do it this way, although according to the docs other members of the overlapped structure are modified by Windows. Ok, we need to rewrite GetOverlappedResult to use the internal structures (and get the hEvent we might have created in ReadFile), instead of r

Re: Patch for ReadFile with NULL hEvent

2004-05-17 Thread Eric Pouech
...Windows doesn't do it this way, although according to the docs other members of the overlapped structure are modified by Windows. Ok, we need to rewrite GetOverlappedResult to use the internal structures (and get the hEvent we might have created in ReadFile), instead of relying on the one from

Re: Patch for ReadFile with NULL hEvent

2004-05-17 Thread Scott W Gifford
I wrote a simple test program and ran it under Windows, to see what Windows does. I've attached the program here. I found that... Eric Pouech <[EMAIL PROTECTED]> writes: [...] > I'm not sure this is a correct fix: > - you modify the passed overlapped structure (by filling in the > hEvent), I'm

Re: Patch for ReadFile with NULL hEvent

2004-05-15 Thread Eric Pouech
Scott W Gifford a écrit : According to MSDN, the hEvent member of an OVERLAPPED structure can be NULL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/overlapped_str.asp OVERLAPPED ... Members ... hEvent Handle to an event s

Patch for ReadFile with NULL hEvent

2004-05-15 Thread Scott W Gifford
According to MSDN, the hEvent member of an OVERLAPPED structure can be NULL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/overlapped_str.asp OVERLAPPED ... Members ... hEvent Handle to an event set to the signaled state