Teledyne LeCroy TA700_800_850 User Manual User Manual
Page 204

Catalyst Enterprises Inc.
Appendix A
190
Assume that it is desired to run a master exerciser program on one TA700 board, and one Target Exerciser program on
another TA700 board. These programs are named master.mtm and target.mtm. The following sequence illustrates this
process:
Two instantiated objects are created by the IRunProjectServer Interface, first TempRun, and then TempRun2
if(!SUCCEEDED(CoCreateInstance(CLSID_RunProjectServer, NULL, CLSCTX_ALL,
IID_IDispatch, (void**)&pDispatch)))
Return;
if(!SUCCEEDED(pDispatch-
>QueryInterface(IID_IRunProjectServer,(void**)&TempRun)))
return ;
pDispatch->Release();
if(!SUCCEEDED(CoCreateInstance(CLSID_RunProjectServer, NULL, CLSCTX_ALL,
IID_IDispatch, (void**)&pDispatch2)))
return;
if(!SUCCEEDED(pDispatch2-
>QueryInterface(IID_IRunProjectServer,(void**)&TempRun2
return;
pDispatch2->Release();
Set all needed data for each. For example the interface type (EPP or USB), port No, FPGA path, project name
(Master.mtm related project for one of them and Target.mtm related project for another)
TempRun->SetInterfaceMode(m_nProject1PortType);
TempRun->SetPortNumber(m_nProject1PortNo);
TempRun->SetFpgaFilesPath(strFPGAFolderPath);
Call the runTA700Project method of TempRun while the new thread is started which uses the TempRun2 as the
connecting interface to RUNProjectServer COM server.
AfxBeginThread(ProgramControlThread,&pData,0,THREAD_PRIORITY_NORMAL);
TempRun->RunTA700Project (strProjectName);
Note: “ProgramControlThread”
is
the function pointer for a similar process for embedded thread
function.