在vista下,双击托盘程序(没有管理员权限)调用主程序(需要管理员权限)
void CMainFrame::OnOpenMainDlg()
{
WriteDebug("^^^^^^^^^^^^^^^^^^start cmd !"); ShellExecute(NULL,NULL,TEXT("multiface.exe"),"",g_CurrentPath,SW_SHOW);
WriteDebug("^^^^^^^^^^^^^^^^^^end cmd !");
}
发现有时候在执行ShellExecute(NULL,NULL,TEXT("multiface.exe"),"",g_CurrentPath,SW_SHOW);这句的时候就停住,不再执行WriteDebug("^^^^^^^^^^^^^^^^^^end cmd !");这一句了,谁碰到过相似的问题
void CMainFrame::OnOpenMainDlg()
{
WriteDebug("^^^^^^^^^^^^^^^^^^start cmd !"); ShellExecute(NULL,NULL,TEXT("multiface.exe"),"",g_CurrentPath,SW_SHOW);
WriteDebug("^^^^^^^^^^^^^^^^^^end cmd !");
}
发现有时候在执行ShellExecute(NULL,NULL,TEXT("multiface.exe"),"",g_CurrentPath,SW_SHOW);这句的时候就停住,不再执行WriteDebug("^^^^^^^^^^^^^^^^^^end cmd !");这一句了,谁碰到过相似的问题
memset(&shex, 0, sizeof(shex));
shex.lpVerb = _T("runas");
shex.lpFile = _T("XXXXXXXXXXX");
ShellExecuteEx(&shex);
谁有这方面的资料?研究研究