The equivalent of PROCESS_INFORMATION.hProcess in IProcess?

delphi package - easy access to kernel objects etc.
Post Reply
Fabricio Araujo
Posts: 2
Joined: Wed Oct 01, 2008 12:37 am

The equivalent of PROCESS_INFORMATION.hProcess in IProcess?

Post 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?
madshi
Site Admin
Posts: 10339
Joined: Sun Mar 21, 2004 5:25 pm

Re: The equivalent of PROCESS_INFORMATION.hProcess in IProce

Post 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
Post Reply