mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-16 22:38:42 +00:00
Changed: Useless code, but later we could call launchProgram
This commit is contained in:
parent
36b69c5a63
commit
52ea07376a
1 changed files with 0 additions and 41 deletions
|
@ -2794,49 +2794,8 @@ void CPatchThread::xDeltaPatch(const string &patch, const string &src, const str
|
||||||
|
|
||||||
// Launching xdelta
|
// Launching xdelta
|
||||||
/*
|
/*
|
||||||
STARTUPINFO si;
|
|
||||||
PROCESS_INFORMATION pi;
|
|
||||||
|
|
||||||
ZeroMemory( &si, sizeof(si) );
|
|
||||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
|
||||||
si.wShowWindow = SW_HIDE;
|
|
||||||
si.cb = sizeof(si);
|
|
||||||
|
|
||||||
ZeroMemory( &pi, sizeof(pi) );
|
|
||||||
|
|
||||||
// Start the child process.
|
// Start the child process.
|
||||||
string strCmdLine = "xdelta patch " + patch + " " + src + " " + out;
|
string strCmdLine = "xdelta patch " + patch + " " + src + " " + out;
|
||||||
|
|
||||||
if( !CreateProcess( NULL, // No module name (use command line).
|
|
||||||
(char*)strCmdLine.c_str(), // Command line.
|
|
||||||
NULL, // Process handle not inheritable.
|
|
||||||
NULL, // Thread handle not inheritable.
|
|
||||||
FALSE, // Set handle inheritance to FALSE.
|
|
||||||
0, // No creation flags.
|
|
||||||
NULL, // Use parent's environment block.
|
|
||||||
NULL, // Use parent's starting directory.
|
|
||||||
&si, // Pointer to STARTUPINFO structure.
|
|
||||||
&pi ) // Pointer to PROCESS_INFORMATION structure.
|
|
||||||
)
|
|
||||||
{
|
|
||||||
// error occurs during the launch
|
|
||||||
string str = toString("Can't execute '%s'", strCmdLine.c_str());
|
|
||||||
throw Exception (str);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wait for the process to terminate
|
|
||||||
DWORD dwTimeout = 1000 * 300; // 5 min = 300 s
|
|
||||||
DWORD nRetWait = WaitForSingleObject(pi.hProcess, dwTimeout);
|
|
||||||
|
|
||||||
if (nRetWait == WAIT_TIMEOUT)
|
|
||||||
{
|
|
||||||
string str = toString("Time Out After %d s", dwTimeout/1000);
|
|
||||||
throw Exception (str);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Close process and thread handles.
|
|
||||||
CloseHandle( pi.hProcess );
|
|
||||||
CloseHandle( pi.hThread );
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue