I\'m writing a simple kernel driver for my application (think of a very simple anti-malware application.)
I\'ve hooked ZwOpenFile() and used PsGetCurr
ZwOpenFile()
PsGetCurr
ZwQueryInformationProcess needs a HANDLE, not a PROCESS! You need to use ObOpenObjectByPointer to get the handle first.
ZwQueryInformationProcess
HANDLE
PROCESS
ObOpenObjectByPointer