1

I am building a server application using IOCP and most of the components are built so they can be re initialised at runtime in case of failure without the application crashing. While everything works fine even with high load i would like to know what are the possible errors in case of GetQueuedCompletionStatus fail with overlapped param null. Mainly what i would like to know is what error i would get if for some reason the port would become corrupt or the system would close it, or any other error that would mean i have to reinitialize the port.

To clarify, i am referring to this case from the docs: "If * lpOverlapped is NULL, the function did not dequeue a completion packet from the completion port. In this case, the function does not store information in the variables pointed to by the lpNumberOfBytes and lpCompletionKey parameters, and their values are indeterminate. "

And i am aware of ERROR_ABANDONED_WAIT_0.

Atlantrix
  • 149
  • 1
  • 8
  • The details explained in [the documentation for `GetQueuedCompletionStatus`](http://msdn.microsoft.com/en-us/library/windows/desktop/aa364986(v=vs.85).aspx) don't cover this? – Lightness Races in Orbit Dec 17 '14 at 15:37
  • There is no clear list about that it says to use GetLastError, but GetLastError can return one of a few hundred codes. I googled a lot before i asked and most of what i found is advice to ignore it. I also know about ERROR_ABANDONED_WAIT_0 but my question is if there are others and if yes which. – Atlantrix Dec 17 '14 at 15:39
  • 2
    There is no list, a device driver is entitled to fail an I/O request with any error code it pleases. – Hans Passant Dec 17 '14 at 17:21
  • That is true but it doesn't really help me. Also my question is if you know any other error except ERROR_ABANDONED_WAIT_0 that means the port is corrupt or closed. – Atlantrix Dec 17 '14 at 17:48
  • 1
    Or a suggestion on when i should call the reinitialize procedure on the port except the ERROR_ABANDONED_WAIT_0 case obviously. – Atlantrix Dec 17 '14 at 18:03

0 Answers0