Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following code example shows how to create and initialize the RTC client object.
**Note **This code has not been thoroughly tested, does not contain error checking, and is not intended for production use.
HRESULT hr = S_OK;
// RTC Initialization
// Use COINIT_MULTITHREADED on Windows CE
::CoInitializeEx(NULL,COINIT_MULTITHREADED);
// Create the RTC Client COM object.
IRTCClient *pIRTCClient;
hr = CoCreateInstance( CLSID_RTCClient,
NULL,
CLSCTX_INPROC_SERVER,
IID_IRTCClient,
reinterpret_cast<void **> (&pIRTCClient) );
// if (hr != S_OK) process error here.
// Initialize the RTCClient interface.
hr = pIRTCClient->Initialize();
// if (hr != S_OK) process error here.
See Also
Send Feedback on this topic to the authors