createprocess() pid is different from actual pid
hello all , Had Launched a Internet Explorer from CreateProcess() but when i used spy++ on IE .It Shows me different PID from what i have from my Create Process ,PROCESS_INFORMATION structure anyone know in this scenario how to get HWND even you can't say EnumWindows() on the basis on pid .I am using Vista 32 bit machine.
Thanks
Re: createprocess() pid is different from actual pid
When you CreateProcess IE, it will start an internal stub, this stub then spawns a new process setting IE to protected mode.
IE is not the only exe doing something like this. Explorer goed even further and tries to connect to an existing instance of explorer exe and tells it to open a new window.
And this behaviour isn't unique to MS either, there's other application packages that have stub-exe's that launch another exe.
Re: createprocess() pid is different from actual pid
Quote:
Originally Posted by
OReubens
When you CreateProcess IE, it will start an internal stub, this stub then spawns a new process setting IE to protected mode.
IE is not the only exe doing something like this. Explorer goed even further and tries to connect to an existing instance of explorer exe and tells it to open a new window.
And this behaviour isn't unique to MS either, there's other application packages that have stub-exe's that launch another exe.
So In that Scenario how to get handle of IEFrame Window from it's PID as i am able to do this in case of Window Server .But i think in case of Vista it is somewhere related with UAC . My Concern it why it showing two Different PID from Same process . Like CreateProcess() return Different PID and task manager and spy++ shows different Process ID.
Thanks