To acquire live data:
1. Initialize the COM environment by calling CoInitialize or CoInitializeEx.
- HRESULT hr = CoInitializeEx(NULL, COINIT_ APARTMENTHEREADED);
- CheckHRESULT(hr);
- SUCCEEDED(hr);
- HRESULT hr = g_TTLLive.CreateInstance(CLSID_TTLLive);
- CheckHRESULT(hr);
- SUCCEEDED(hr);
- g_TTLLive->OpenConnections(TTLAPI_OCCMD_AUTODETECT, 1000, NULL, NULL);
- g_TTLLive->CloseConnections();
- not sure yet
7. Synchronously start all channels using StartChannels.
8. Retrieve data periodically using ReadChannelData or ReadChannelDataVT.
9. When finished, close all connections using CloseConnections.
10. Release queried ITTLLive or ITTLLive2 interface.
11. Match the previous call to CoInitialize or CoInitializeEx with a call to CoUninitialize
==
basic from the dacument of ProComp.
No comments:
Post a Comment