Examples, Irunprojectservers interface examples, Xamples – Teledyne LeCroy TA700_800_850 User Manual User Manual
Page 219: Roject, Ervers, Nterface

Examples
Catalyst Enterprises, Inc.
205
Examples
The following are some examples of working with TA700 Com API, illustrating the use of all of the methods supported
by our library:
IRunProjectServers Interface Examples
LPDISPATCH pDispatch = NULL;
IRunProjectServer* Run = NULL;
VERIFY(SUCCEEDED(CoInitialize(NULL)));
VERIFY(SUCCEEDED(CoCreateInstance(
CLSID_RunProjectServer,
NULL,
CLSCTX_ALL,
IID_IDispatch, (void**)&pDispatch)
));
VERIFY(SUCCEEDED(pDispatch->QueryInterface(
IID_IRunProjectServer,
(void**)&Run))
);
//Set the device specifics for TA850 with 0x123 serial id
Run->SetDeviceID(0 , 0x123);
//-- Set port number to 1, so it means that you want to attach to first USB
port
Run->SetPortNumber(1);
//Set the Interface to Hardware to USB Port
Run->SetInterfaceMode(1);
//-- Set the Trigger to trigger on a positive level
Run->SetTriggerOption(1);
//-- By default the TA700 detects and monitors the critical voltages on the
PCI bus but with
//-- this setting the Bus 3.3 Volt will be masked
Run->SetVoltageMasks(2);
//-- By default the TA700 detects all protocol errors specified for PCI, PCI-
X bus but ,with