CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    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

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    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.

  3. #3
    Join Date
    May 2005
    Location
    Oregon
    Posts
    3,725

    Re: createprocess() pid is different from actual pid

    Quote Originally Posted by OReubens View Post
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured