Page 1 of 1

The equivalent of PROCESS_INFORMATION.hProcess in IProcess?

PostPosted: Wed Jun 07, 2017 5:26 pm
by Fabricio Araujo
Sorry for the rookie question but,

I'm trying to use madKernel.NewProcess in a inherited application using CreateProcess, but I
guess PROCESS_INFORMATION.hProcess is stored in IProcess.HInstance.

This is correct?

Re: The equivalent of PROCESS_INFORMATION.hProcess in IProce

PostPosted: Wed Jun 14, 2017 8:41 am
by madshi
No. The IProcess interface inherits from IKernelObj, and IKernelObj has a method called "Handle", which returns an IHandle interface. The IHandle interface has a method called "Handle" which gives you the "hProcess" value. So basically you could do this:

Code: Select all
hProcess := processInterfaceYouGotFromNewProcess.Handle.Handle;


http://help.madshi.net/IProcessRef.htm