Minor improvements and cleanings after recent WinCE fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: msw/utilsexec.cpp
|
// Name: src/msw/utilsexc.cpp
|
||||||
// Purpose: wxExecute implementation for MSW
|
// Purpose: wxExecute implementation for MSW
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -710,18 +710,9 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
|
|||||||
#ifndef __WXWINCE__
|
#ifndef __WXWINCE__
|
||||||
dwFlags |= CREATE_DEFAULT_ERROR_MODE ;
|
dwFlags |= CREATE_DEFAULT_ERROR_MODE ;
|
||||||
#else
|
#else
|
||||||
wxString moduleName;
|
// we are assuming commands without spaces for now
|
||||||
wxString arguments;
|
wxString moduleName = command.BeforeFirst(wxT(' '));
|
||||||
int idx = command.Find( wxT(' ') );
|
wxString arguments = command.AfterFirst(wxT(' '));
|
||||||
if( idx >= 0 )
|
|
||||||
{
|
|
||||||
moduleName = command.Left(idx);
|
|
||||||
arguments = command.Mid(idx+1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
moduleName = command;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool ok = ::CreateProcess
|
bool ok = ::CreateProcess
|
||||||
@@ -733,7 +724,6 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
|
|||||||
moduleName.c_str(), // application name
|
moduleName.c_str(), // application name
|
||||||
(wxChar *)
|
(wxChar *)
|
||||||
arguments.c_str(), // arguments
|
arguments.c_str(), // arguments
|
||||||
|
|
||||||
#else
|
#else
|
||||||
NULL, // application name (use only cmd line)
|
NULL, // application name (use only cmd line)
|
||||||
(wxChar *)
|
(wxChar *)
|
||||||
@@ -962,4 +952,3 @@ long wxExecute(wxChar **argv, int flags, wxProcess *handler)
|
|||||||
|
|
||||||
return wxExecute(command, flags, handler);
|
return wxExecute(command, flags, handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user