> There is not - I was wondering if, since the overlapped op was
> initiated by another call that /did/ support a timeout, it would
> continue to use up that time limit and then expire... but I have no
> knowledge beyond the guess.

Here's the full "remarks" section of the MSDN page on GetOverlappedResult( ):

"The results reported by the GetOverlappedResult function are those of the
specified handle's last overlapped operation to which the specified OVERLAPPED
structure was provided, and for which the operation's results were pending. A
pending operation is indicated when the function that started the operation
returns FALSE, and the GetLastError function returns ERROR_IO_PENDING. When an
I/O operation is pending, the function that started the operation resets the
hEvent member of the OVERLAPPED structure to the nonsignaled state. Then when
the pending operation has been completed, the system sets the event object to
the signaled state.

Specify a manual-reset event object in the OVERLAPPED structure. If an
auto-reset event object is used, the event handle must not be specified in any
other wait operation in the interval between starting the overlapped operation
and the call to GetOverlappedResult. For example, the event object is
sometimes specified in one of the wait functions to wait for the operation's
completion. When the wait function returns, the system sets an auto-reset
event's state to nonsignaled, and a subsequent call to GetOverlappedResult
with the bWait parameter set to TRUE causes the function to be blocked
indefinitely.

If the bWait parameter is TRUE, GetOverlappedResult determines whether the
pending operation has been completed by waiting for the event object to be in
the signaled state.

If the hEvent member of the OVERLAPPED structure is NULL, the system uses the
state of the hFile handle to signal when the operation has been completed. Use
of file, named pipe, or communications-device handles for this purpose is
discouraged. It is safer to use an event object because of the confusion that
can occur when multiple simultaneous overlapped operations are performed on
the same file, named pipe, or communications device. In this situation, there
is no way to know which operation caused the object's state to be signaled.


Windows Me/98/95:  If bWait is TRUE, the hEvent member of the OVERLAPPED
structure must not be NULL."

This makes me advice against using GetOverlappedResult( ) to do the waiting
(which seems to be internally done by waiting on the event as well, though I
wonder what goes on in 9x based on the last line of the remarks section.)  But
again I reiterate that I never adviced to use it to begin with!  Which again
reminds me that "the worst vice is advice!"  ;-)

-------------
Ehsan Akhgari

Farda Technology (http://www.farda-tech.com/)

List Owner: [email protected]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]

With one's principles one seeks to tyrannize over one's habits or to justify
or honour or scold or conceal them - two people with the same principles
probably seek something fundamentally different with them.
-Beyond Good And Evil, F. W. Nietzsche




_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to