diff --git a/checkin_notes b/checkin_notes index 6ec89c6391..82f35ee367 100644 --- a/checkin_notes +++ b/checkin_notes @@ -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 diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index 1533c81ede..2069826a94 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/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 );