The equivalent of PROCESS_INFORMATION.hProcess in IProcess?

delphi package - easy access to kernel objects etc.

The equivalent of PROCESS_INFORMATION.hProcess in IProcess?

Postby Fabricio Araujo » Wed Jun 07, 2017 5:26 pm

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?
Fabricio Araujo
 
Posts: 2
Joined: Wed Oct 01, 2008 12:37 am

Re: The equivalent of PROCESS_INFORMATION.hProcess in IProce

Postby madshi » Wed Jun 14, 2017 8:41 am

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


Return to madKernel

Who is online

Users browsing this forum: No registered users and 4 guests

cron