mirror of https://github.com/BOINC/boinc.git
- Empty strings cause CreateProcess to fail on parameter checks.
clientgui/ BOINCGUIApp.cpp svn path=/trunk/boinc/; revision=14483
This commit is contained in:
parent
5104b76439
commit
e87a0a980e
|
@ -148,3 +148,9 @@ David Jan 7 2007
|
||||||
|
|
||||||
tools/
|
tools/
|
||||||
backend_lib.C
|
backend_lib.C
|
||||||
|
|
||||||
|
Rom Jan 7 2007
|
||||||
|
- Empty strings cause CreateProcess to fail on parameter checks.
|
||||||
|
|
||||||
|
clientgui/
|
||||||
|
BOINCGUIApp.cpp
|
||||||
|
|
|
@ -605,6 +605,8 @@ void CBOINCGUIApp::StartupBOINCCore() {
|
||||||
wxString strExecute = wxEmptyString;
|
wxString strExecute = wxEmptyString;
|
||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
|
LPTSTR szExecute = NULL;
|
||||||
|
LPTSTR szDataDirectory = NULL;
|
||||||
|
|
||||||
// Append boinc.exe to the end of the strExecute string and get ready to rock
|
// Append boinc.exe to the end of the strExecute string and get ready to rock
|
||||||
strExecute.Printf(
|
strExecute.Printf(
|
||||||
|
@ -624,15 +626,22 @@ void CBOINCGUIApp::StartupBOINCCore() {
|
||||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||||
si.wShowWindow = SW_HIDE;
|
si.wShowWindow = SW_HIDE;
|
||||||
|
|
||||||
|
szExecute = (LPTSTR)strExecute.c_str();
|
||||||
|
if (GetDataDirectory().empty()) {
|
||||||
|
szDataDirectory = NULL;
|
||||||
|
} else {
|
||||||
|
szDataDirectory = (LPTSTR)GetDataDirectory().c_str();
|
||||||
|
}
|
||||||
|
|
||||||
bProcessStarted = CreateProcess(
|
bProcessStarted = CreateProcess(
|
||||||
NULL,
|
NULL,
|
||||||
(LPTSTR)strExecute.c_str(),
|
szExecute,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
FALSE,
|
FALSE,
|
||||||
CREATE_NEW_PROCESS_GROUP|CREATE_NO_WINDOW,
|
CREATE_NEW_PROCESS_GROUP|CREATE_NO_WINDOW,
|
||||||
NULL,
|
NULL,
|
||||||
(LPTSTR)GetDataDirectory().c_str(),
|
szDataDirectory,
|
||||||
&si,
|
&si,
|
||||||
&pi
|
&pi
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue