if( !*rest )
{
// FIXME: use comspec instead
- rest = "cmd";
+ rest = _T("cmd");
}
/* get the PATH environment variable and parse it */
/* search the PATH environment variable for the binary */
- param = strchr( rest, ' ' ); // skip program name to reach parameters
+ param = _tcschr( rest, _T(' ') ); // skip program name to reach parameters
if( param )
{
*param = 0;
!_tcsicmp (_tcsrchr (szFullName, _T('.')), _T(".cmd")))
{
#ifdef _DEBUG
- DebugPrintf ("[BATCH: %s %s]\n", szFullName, rest);
+ DebugPrintf (_T("[BATCH: %s %s]\n"), szFullName, rest);
#endif
ConErrPuts (_T("No batch support at the moment!"));
}
STARTUPINFO stui;
#ifdef _DEBUG
- DebugPrintf ("[EXEC: %s %s]\n", szFullName, rest);
+ DebugPrintf (_T("[EXEC: %s %s]\n"), szFullName, rest);
#endif
/* build command line for CreateProcess() */
_tcscpy (szFullCmdLine, first);
if( param )
{
- _tcscat(szFullCmdLine, " " );
+ _tcscat(szFullCmdLine, _T(" ") );
_tcscat (szFullCmdLine, param);
}
WaitForSingleObject (prci.hProcess, INFINITE);
GetExitCodeProcess (prci.hProcess, &dwExitCode);
nErrorLevel = (INT)dwExitCode;
- CloseHandle (prci.hThread);
- CloseHandle (prci.hProcess);
}
+ CloseHandle (prci.hThread);
+ CloseHandle (prci.hProcess);
}
else
{
ErrorMessage (GetLastError (),
- "Error executing CreateProcess()!!\n");
+ _T("Error executing CreateProcess()!!\n"));
}
}