locked
Issue about CAccessToken::CreateProcessAsUser()??

    問題

  • Hi,

    I use CAccessToken::CreateProcessAsUser() to launch window. For this i am taking

            STARTUPINFO si = {0};

            si.cb          = sizeof(si);
            si.lpDesktop   = &wstrDesktopName[0];  // I take desktop name from HKLM registry
            si.lpTitle     = NULL;
            si.dwFlags     = 0;
            si.cbReserved2 = 0;
            si.lpReserved  = NULL;
            si.lpReserved2 = NULL;

    but my window launch behind another window, not on top of other windows, which is different from regular behavior of other windows.

    Please give suggestion to launch window on top most of other windows.

    Thanks,

    Goku 

    2012年3月6日 上午 09:40

所有回覆

  • In STARTUPINFO structure , there are plenty others parameters to fill:

    http://msdn.microsoft.com/fr-fr/library/ms686331.aspx

    Perhaps this lines are usefull:

    si.dwFlags=STARTF_USESHOWWINDOW;

    si.wShowWindow=SW_SHOW;


    Delphine GARRO


    2012年3月6日 下午 12:45
  • Hi,

    I have done with the following , but it doesn't affect the situation, still problem persists.

    si.dwFlags=STARTF_USESHOWWINDOW;

    si.wShowWindow=SW_SHOW;

    Thanks,

    Amol

    2012年3月8日 上午 09:10
  • Hi,

    I face this problem only when, i launched window using shortcut.. for others like. launching window from startmenu, quick launch , works fine..

    Thanks,

    Amol

    2012年3月12日 上午 10:02