Changeset 154


Ignore:
Timestamp:
08/12/11 15:03:24 (13 years ago)
Author:
jhall
Message:

Added some code to be able to run mahrtomtest properly with parameter: commands/pause.dll
Not working with other executables/parameters - work in progress

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MFCtooling/replay/LogParser.cpp

    r143 r154  
    1515         
    1616} 
     17 
    1718 
    1819 
     
    4041                ZeroMemory(&pi, sizeof(pi)); 
    4142                ZeroMemory(&si, sizeof(si)); 
    42                 CreateProcess(NULL, runCommand, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); 
     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); 
    4353                hProcess = pi.hProcess; 
    4454                CloseHandle(pi.hThread); 
     55                 
    4556                std::wcout << L"waiting " << startupTime << L" ms for application under test to intialize" << std::endl; 
    4657                Sleep(startupTime); 
Note: See TracChangeset for help on using the changeset viewer.