window 平台启动进程

	wchar_t wcharProgram[1024 * 10] = { 0 };
	QString cmdLine = QString("%1/7z.exe a -tzip %2 %3modelDescription.xml %3binaries %3sources").
	arg(QCoreApplication::applicationDirPath()).
	arg(targetFmuPath).
	arg(createHeaderParam.m_codePath);
	
	cmdLine.toWCharArray(wcharProgram);
	PROCESS_INFORMATION information;
	STARTUPINFO startupInfo = { 0 };
	startupInfo.dwFlags = STARTF_USESHOWWINDOW;
	startupInfo.wShowWindow = FALSE;
	int iRes = CreateProcess(NULL, wcharProgram, NULL, NULL, true, CREATE_NEW_CONSOLE, NULL, NULL, &startupInfo, &information);

你可能感兴趣的:(c++,window,process)