Forum Discussion
Hi,
You can work with AQtime via COM by using the IaqBaseManager or IaqTimeIntegrationSupportManager object. Working with the latter is easier, so we recommend that you begin with it.
Here is an example of obtaining a reference to the IaqTimeIntegrationSupportManager object:
#include "stdafx.h"
#include "AQtimeConstants.h"
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hr;
// note: the AQtimeConstants.h file misses the declaration of the CProductAQtime constant, we declare it here:
static const GUID CProductAQtime = {0x17DD53D6, 0x9408, 0x44A9, {0xB6, 0x5D, 0xE1, 0x3A, 0x96, 0xD5, 0x35, 0x03}};
hr = CoInitialize(NULL);
_ASSERT(SUCCEEDED(hr));
CComPtr<IAQtimeManager> aqTimeManager;
hr = CoCreateInstance( CProductAQtime, NULL, CLSCTX_LOCAL_SERVER, __uuidof(IAQtimeManager) , (void**)&aqTimeManager );
_ASSERT(SUCCEEDED(hr));
CComPtr<IaqTimeIntegrationSupportManager> IntergrationManager;
hr = aqTimeManager->get_IntegrationManager( &IntergrationManager );
_ASSERT(SUCCEEDED(hr));
return 0;
}
The AQtimeConstants.h file is shipped along with AQtime. You can find it in the <Users>\Public\Documents\AQtime 7 SDK\CPP\Common\ folder (on Windows 7, Windows Vista and Windows Server 2008).
Related Content
- 4 years ago
- 10 years ago
- 10 years ago
Recent Discussions
- 5 months ago
- 2 years ago