A forum for reverse engineering, OS internals and malware analysis 

 #23845  by Vrtule
 Wed Sep 10, 2014 11:31 am
Hello,

keep in mind that when passing the pInfo structure to usermode (as a response to an IOCTL sent by your application), all the structure must be copied into the output buffer of IOCTL request packet. By the term "all the structure" I mean also the string containing the process image file name.

Also, PID is not a real handle. Yes, PIDs are organized into a handletable (at least, they were in the past) but if you want to get some information about certain process, you have to use OpenProcess to create a process handle from its PID (let's say for now that you are not interested in things like Tool Help or DuplicateHandle).