关于在WIN CE下打开其他进程,暂时发现两种:
1.用CreateProcess();
例如要打开windows下的explorer:
TCHAR szAppName[] = TEXT("//Windows//explorer.exe");
TCHAR szAppCmd[]=L"close";
int err=CreateProcess(szAppName,szAppCmd, NULL, NULL,false,0, NULL, NULL,NULL,NULL);
if(err==0)
{
err=GetLastError();
CString errr;
errr.Format(L"%d",err);
AfxMessageBox(errr) ;
}
2.用ShellExecuteEx();
还是打开explorer:
SHELLEXECUTEINFO te;
memset(&te,0x00,sizeof(SHELLEXECUTEINFO));//清空内存的一定要加,不加会失败的。。。。。。
te.lpFile=L"//Windows//explorer.exe";
te.lpVerb=L"open";
te.cbSize = sizeof(SHELLEXECUTEINFO);
te.fMask = SEE_MASK_NOCLOSEPROCESS;
te.hwnd = NULL;
te.lpVerb = _T("open");
te.nShow = SW_SHOWNORMAL;
ShellExecuteEx(&te);