Partager via


Add to Media Preferences

The following code example shows how to add media preferences to a Communications Service application. The operations in the Initialize the Communications Service 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.

HRESULT hr = S_OK;
LONG lGetMedia = 0;
LONG lSetMedia = 0;
// Get the existing media capabilities.
hr = pIRTCClient->get_PreferredMediaTypes(&lGetMedia);
// Add in the new media type.
lSetMedia = lGetMedia | RTCMT_T120_SENDRECV;
// Set the media capabilities with no persistence.
hr = pIRTCClient->SetPreferredMediaTypes(lSetMedia, VARIANT_FALSE);

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.