Prev: query remaining Stack Size
Next: How do I assign 'logon as service' privilege on Vista Home / Home Premium? (CreateProcessAsUser())
From: Dansk on 20 May 2007 06:33 Yes I do, because the started process needs to be vista-elevated, and because of that, CreateProcess fails Gary Chanson wrote : > Do you really need to use ShellExecuteEx? If you use CreateProcess, it > returns the process ID as one of the elements of lpProcessInformation. >
From: Dansk on 20 May 2007 06:36
James Brown a �crit : > "Dansk" <dansk(a)laouilest.com> wrote in message > news:%23boXp9UmHHA.4624(a)TK2MSFTNGP04.phx.gbl... >> Good catch, this was an easy one. >> (http://msdn2.microsoft.com/en-us/library/ms683215.aspx) >> >> More challenging : >> How can I get the process Id from its handle on systems prior to winXP >> sp1 ? >> >> Thanks in advance, >> Dansk. >> >> Elcaro Nosille wrote : >>> Dansk schrieb: >>> >>>> Hi all, >>>> I start a process using ShellExecuteEx and I get the process handle. >>>> I also need the process ID, how can I get it ? >>> >>> processId = GetProcessId( hProcess ) >>> ? >> > > On NT-based systems use the ZwQueryInformationProcess native API > > see: www.catch22.net/tuts/tips2.asp for an example > > Thanks for that very interesting pointer. |