[NTDev] Overlapped IO ...

Ok I’m down to the point of scratching parts of my anatomy other than my
head so I guess it’s time to query the list.

I have a defined a set of error/status codes for my driver and I am trying
to utilize them in an application. The problem I’m having is acquiring the
error/status code in the FileIOCompletionRoutine callback function. To this
end I am calling GetOverLapped/GetLastError. The error code passed into
FileIOCompletionRoutine is always zero, but I see my defined time out error
code (0x60040026) in the Internal field of the overlapped structure. In this
particular instance, that error code is valid, as the device has indeed
timed out, but calling GetLastError after GetOverLappedResult returns bogus
status. Is it valid to use POVERLAPPED->Internal as the error/status? If
not, then how do I acquire a valid error/status in the application using
overlapped IO?.

Gary