// If flags contain wxEXEC_SYNC, return -1 on failure and the exit code of the
// process if everything was ok. Otherwise (i.e. if wxEXEC_ASYNC), return 0 on
// failure and the PID of the launched process if ok.
-WXDLLEXPORT long wxExecute(char **argv, int flags = wxEXEC_ASYNC,
+WXDLLEXPORT long wxExecute(wxChar **argv, int flags = wxEXEC_ASYNC,
wxProcess *process = (wxProcess *) NULL);
WXDLLEXPORT long wxExecute(const wxString& command, int flags = wxEXEC_ASYNC,
wxProcess *process = (wxProcess *) NULL);
#endif // Win16/32
}
-long wxExecute(char **argv, int flags, wxProcess *handler)
+long wxExecute(wxChar **argv, int flags, wxProcess *handler)
{
wxString command;
- while ( *argv != NULL )
+ for ( ;; )
{
- command << *argv++ << ' ';
- }
+ command += *argv++;
+ if ( !*argv )
+ break;
- command.RemoveLast();
+ command += _T(' ');
+ }
return wxExecute(command, flags, handler);
}