- Empty strings cause CreateProcess to fail on parameter checks.

clientgui/
        BOINCGUIApp.cpp

svn path=/trunk/boinc/; revision=14483
This commit is contained in:
Rom Walton 2008-01-07 22:08:17 +00:00
parent 5104b76439
commit e87a0a980e
2 changed files with 17 additions and 2 deletions

View File

@ -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

View File

@ -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
);