Create and Enable a Profile (Windows Embedded CE 6.0)

1/6/2010

The following code example shows how to create the Profile object and enable the profile for use by the RTC API. The operations in the Initialize RTC example must be performed before using this code.

Note

This code has not been thoroughly tested, does not contain error checking, and is not intended for production use.

IRTCClientProvisioning *pIRTCClientProvisioning = NULL;
IRTCProfile *pIRTCProfile  = NULL;
BSTR bstrXMLProfile =  // XML Blob referenced in different section.

// Perform QI for the Provisioning interface.
hr = pIRTCClient->QueryInterface(IID_IRTCClientProvisioning,
                  reinterpret_cast<void **>(&pIRTCClientProvisioning);

// if (hr != S_OK) process error here. 

// Create the Profile object.
hr = pIRTCClientProvisioning->CreateProfile( bstrXMLProfile,
                                             &pIRTCProfile );

// if (hr != S_OK) process error here. 

// Enable the Profile and Register. 
hr = pIRTCClientProvisioning->EnableProfile( pIRTCProfile, 
                                             RTCRF_REGISTER_ALL);

// if (hr != S_OK) process error here. 

See Also

Concepts

Fundamental RTC Code Examples