- Timestamp:
- 08/15/11 15:34:28 (13 years ago)
- Location:
- trunk/MFCtooling/replay
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MFCtooling/replay/LogParser.cpp
r159 r163 8 8 LogParser::LogParser(_TCHAR* runCommand, unsigned int startupTime, TestResults * results, bool useDefaultDelay) : runCommand(runCommand), startupTime(startupTime), results(results), useDefaultDelay(useDefaultDelay) 9 9 { 10 10 workingPath = NULL; 11 11 } 12 12 … … 42 42 ZeroMemory(&si, sizeof(si)); 43 43 44 //divide runCommand into path to executable and parameters 45 /*wchar_t *pdest = _tcschr(runCommand, ' '); 46 int positionSpace = (int)(pdest - runCommand + 1); 47 _TCHAR *executable = new _TCHAR[512]; 48 for(int i=0; i<positionSpace; i++) executable[i] = runCommand[i]; 49 executable[positionSpace] = '\0';*/ 50 51 //CreateProcess(executable, L" c:\\programme\\mahr\\marwin\\commands/pause.dll", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); 52 CreateProcess(NULL, runCommand, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); 44 CreateProcess(NULL, runCommand, NULL, NULL, FALSE, 0, NULL, workingPath, &si, &pi); 45 53 46 hProcess = pi.hProcess; 54 47 CloseHandle(pi.hThread); … … 257 250 } 258 251 } 252 253 void LogParser::setWorkingPath(TCHAR * workingPath) { 254 this->workingPath = workingPath; 255 } -
trunk/MFCtooling/replay/LogParser.h
r142 r163 24 24 25 25 _TCHAR * runCommand; 26 _TCHAR * workingPath; 26 27 unsigned int startupTime; 27 28 HANDLE hProcess; … … 63 64 64 65 int getDefaultMsgDelay(); 66 67 void setWorkingPath(TCHAR * workingPath); 65 68 }; -
trunk/MFCtooling/replay/replay.cpp
r161 r163 50 50 int _tmain(int argc, _TCHAR* argv[]) 51 51 { 52 if( argc < 3 ) { 53 return -1; 54 } 55 52 56 int optchar; 53 57 const char * optarg; 54 55 58 // set default values 56 59 TCHAR * resultfile = NULL; … … 122 125 std::wcout << L"replaying sessions in " << argv[1] << std::endl; 123 126 LogParser * parser = new LogParser(appUnderTest, startdelay, &results, (bool) msgdelay); 127 parser->setWorkingPath(workingPath); 124 128 pXMLReader->putContentHandler(parser); 125 129 hr = pXMLReader->parseURL(replayfile);
Note: See TracChangeset
for help on using the changeset viewer.