Create and Enable a Profile (Windows CE 5.0)

Send Feedback

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

Fundamental RTC Code Examples

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.