使用VC++开发考场随机排座系统[组图](2)
startInfo.lpTitle = buf;
startInfo.lpDesktop = NULL;
startInfo.dwX = 0;
startInfo.dwY = 0;
startInfo.dwXSize = 0;
startInfo.dwYSize = 0;
startInfo.dwXCountChars = 0;
startInfo.dwYCountChars = 0;
startInfo.dwFlags = STARTF_USESTDHANDLES;
startInfo.wShowWindow = 0; //SW_SHOWDEFAULT;
startInfo.lpReserved2 = NULL;
startInfo.cbReserved2 = 0;
startInfo.hStdInput = 0;
startInfo.hStdOutput = 0;
startInfo.hStdError = 0;
//产生新的进程,运行命令行,调用转换引擎进行转换
int nRet=CreateProcess(
NULL,
cmdll,
NULL,
NULL,
TRUE,
0, //CREATE_NEW_CONSOLE
NULL,
NULL,
&startInfo,
&pidInfo);
if(!nRet)
{
AfxMessageBox("调用引擎失败,程序将退出!",MB_OK|MB_ICONSTOP);
return -1;
}
DWORD dwWait=WaitForSingleObject(pidInfo.hProcess, INFINITE); //等待进程结束
return;
- 上一篇:SQLite在VC下的使用
- 下一篇:用VC6实现IE工具栏[组图]