-// TODO:
-/*
- STARTUPINFO si;
- memset(&si, 0, sizeof(si));
- si.cb = sizeof(si);
-
- PROCESS_INFORMATION pi;
-
- if ( ::CreateProcess(
- NULL, // application name (use only cmd line)
- (wxChar *)command.c_str(), // full command line
- NULL, // security attributes: defaults for both
- NULL, // the process and its main thread
- FALSE, // don't inherit handles
- CREATE_DEFAULT_ERROR_MODE, // flags
- NULL, // environment (use the same)
- NULL, // current directory (use the same)
- &si, // startup info (unused here)
- &pi // process info
- ) == 0 )
+ UCHAR vLoadError[CCHMAXPATH] = {0};
+ RESULTCODES vResultCodes = {0};
+ ULONG ulExecFlag;
+ PSZ zArgs = NULL;
+ PSZ zEnvs = NULL;
+ APIRET rc;
+ TID vTID;
+
+ if (flags & wxEXEC_SYNC)
+ ulExecFlag = EXEC_SYNC;
+ else
+ ulExecFlag = EXEC_ASYNCRESULT;
+
+ rc = ::DosExecPgm( (PCHAR)vLoadError
+ ,sizeof(vLoadError)
+ ,ulExecFlag
+ ,zArgs
+ ,zEnvs
+ ,&vResultCodes
+ ,rCommand.c_str()
+ );
+ if (rc != NO_ERROR)