For some reason, my callback isn\'t receiving the address of the correct OVERLAPPED
structure after a call to ReadFileEx
. What can cause this?
Also, it's also quite possible that ownership of the original OVL struct was not relinquished when the callback was set up, and so overwritten between the setup and the callback.
Or even possible that an inexperienced developer might allocate it on the stack of the thread setting it up - not a good move :)
I forgot to specify FILE_FLAG_OVERLAPPED
to CreateFile
.