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/
|
||||
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;
|
||||
|
||||
#if defined(__WXMSW__)
|
||||
LPTSTR szExecute = NULL;
|
||||
LPTSTR szDataDirectory = NULL;
|
||||
|
||||
// Append boinc.exe to the end of the strExecute string and get ready to rock
|
||||
strExecute.Printf(
|
||||
|
@ -624,15 +626,22 @@ void CBOINCGUIApp::StartupBOINCCore() {
|
|||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
si.wShowWindow = SW_HIDE;
|
||||
|
||||
szExecute = (LPTSTR)strExecute.c_str();
|
||||
if (GetDataDirectory().empty()) {
|
||||
szDataDirectory = NULL;
|
||||
} else {
|
||||
szDataDirectory = (LPTSTR)GetDataDirectory().c_str();
|
||||
}
|
||||
|
||||
bProcessStarted = CreateProcess(
|
||||
NULL,
|
||||
(LPTSTR)strExecute.c_str(),
|
||||
szExecute,
|
||||
NULL,
|
||||
NULL,
|
||||
FALSE,
|
||||
CREATE_NEW_PROCESS_GROUP|CREATE_NO_WINDOW,
|
||||
NULL,
|
||||
(LPTSTR)GetDataDirectory().c_str(),
|
||||
szDataDirectory,
|
||||
&si,
|
||||
&pi
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue