Applied patch [ 1357475 ] WinCE : wxExecute does not execute programs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -706,15 +706,37 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler)
|
|||||||
|
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
DWORD dwFlags = CREATE_SUSPENDED;
|
DWORD dwFlags = CREATE_SUSPENDED;
|
||||||
|
|
||||||
#ifndef __WXWINCE__
|
#ifndef __WXWINCE__
|
||||||
dwFlags |= CREATE_DEFAULT_ERROR_MODE ;
|
dwFlags |= CREATE_DEFAULT_ERROR_MODE ;
|
||||||
|
#else
|
||||||
|
wxString ModuleName;
|
||||||
|
wxString Arguments;
|
||||||
|
{ int idx = command.Find( wxT(' ') );
|
||||||
|
if( idx >= 0 ) {
|
||||||
|
ModuleName = command.Left(idx);
|
||||||
|
Arguments = command.Mid(idx+1);
|
||||||
|
} else {
|
||||||
|
ModuleName = command;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool ok = ::CreateProcess
|
bool ok = ::CreateProcess
|
||||||
(
|
(
|
||||||
|
// WinCE requires appname to be non null
|
||||||
|
// Win32 allows for null
|
||||||
|
#ifdef __WXWINCE__
|
||||||
|
(wxChar *)
|
||||||
|
ModuleName.c_str(), // application name
|
||||||
|
(wxChar *)
|
||||||
|
Arguments.c_str(), // arguments
|
||||||
|
|
||||||
|
#else
|
||||||
NULL, // application name (use only cmd line)
|
NULL, // application name (use only cmd line)
|
||||||
(wxChar *)
|
(wxChar *)
|
||||||
command.c_str(), // full command line
|
command.c_str(), // full command line
|
||||||
|
#endif
|
||||||
NULL, // security attributes: defaults for both
|
NULL, // security attributes: defaults for both
|
||||||
NULL, // the process and its main thread
|
NULL, // the process and its main thread
|
||||||
redirect, // inherit handles if we use pipes
|
redirect, // inherit handles if we use pipes
|
||||||
|
Reference in New Issue
Block a user