Hi everyone…
I was battling a situation when I call ZwDeviceIoControlFile and on
(successful) return see garbage in supplied IO_STATUS_BLOCK. As it turned
out (obviously) I’ve called this function at APC_LEVEL IRQL so… And here
is where I found myself wandering “why”. I’ve confirmed that the actual IRP
to which DevIoCtl has been transformed has completed in the same thread in
which I called ZwDeviceIoControlFile. So there is no need for I/O Mgr to
schedule special APC to copy buffers including copying IoStatus to UserIosb.
And (as far as I remember) that should be exactly the case: if
IoCompleteRequest is called in the context of the thread that issued the
IRP, I/O Manager will perform all necessary operations within this call
without scheduling special APC.
What am I missing here?
TIA,
Vladimir