IWMSContentDescriptionList Interface

Note

   This interface is available only on Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; and Windows Server 2008.

The IWMSContentDescriptionList interface provides methods for managing a list of IWMSContext interfaces that contain content description contexts. You can use this interface to provide content information for each item in a playlist. If you are not working with playlists, use the IWMSContextIWMSContext Interface to retrieve and specify context values.

The AppendDescription, GetIndexedDescription, and GetDescriptionInLanguage methods require that you pass locale information. The following example illustrates how to determine the default locale of a local computer.

#include <windows.h>
#define LPWSTR_DELETE(p)  if(NULL != p) {delete[] p; p = NULL; }

LPWSTR wstrLocale = NULL;
LPWSTR wstrLanguage = NULL;
LPWSTR wstrCountry = NULL;
int    cchLanguage = 0;  
int    cchCountry = 0;

// Retrieve the system default locale ID.
LCID  lid = GetSystemDefaultLCID();

// Retrieve the number of characters required to hold
// the ISO639 language information, including the 
// NULL character.
cchLanguage = GetLocaleInfoW(
                            lid,
                            LOCALE_SISO639LANGNAME,
                            0,
                            0
                            );

wstrLanguage = new WCHAR[ cchLanguage ]; 
if( NULL == wstrLanguage )
{
    goto EXIT;
}

// Fill the wstrLanguage string with language information.
cchLanguage = GetLocaleInfoW(
                             lid,
                             LOCALE_SISO639LANGNAME,
                             wstrLanguage,
                             cchLanguage
                                  );   

// Retrieve the number of characters required to hold
// the ISO3166 country/region information, including the NULL
// character.
cchCountry = GetLocaleInfoW(
                            lid,
                            LOCALE_SISO3166CTRYNAME,
                            0,
                            0
                            );

// Allocate memory for the language ID.
wstrCountry = new WCHAR[ cchCountry ];
if( NULL == wstrCountry )
{
    goto EXIT;
}
    
// Fill the wstrCountry string with country/region information.
cchCountry = GetLocaleInfoW(
                             lid,
                             LOCALE_SISO3166CTRYNAME,
                             wstrCountry,
                             cchCountry
                            );

// Concatenate the language and country/region information. For example,
// the English language spoken in the United States is represented
// by en-us.
wstrLocale = new WCHAR[ cchLanguage + cchCountry ];
lstrcpynW(wstrLocale, wstrLanguage, cchLanguage);
lstrcatW(wstrLocale, L"-");
lstrcatW(wstrLocale, wstrCountry);

EXIT:

    LPWSTR_DELETE( wstrLanguage );
    LPWSTR_DELETE( wstrCountry );
    LPWSTR_DELETE( wstrLocale );

In addition to the methods inherited from IUnknown, the IWMSContentDescriptionList interface exposes the following methods

Method

Description

AppendDescription

Adds an IWMSContext interface containing a content description context to the description list.

GetBroadcastid

Reserved for internal use.

GetDescriptionCount

Retrieves the number of content description contexts in the description list.

GetDescriptionInLanguage

Retrieves the content description context for a specific language.

GetIndexedDescription

Retrieves a specific content description context from the description list by index.

GetPlaylistGenid

Reserved for internal use.

RemoveAllDescriptions

Removes all content description contexts from the description list.

RemoveValueFromAllDescriptions

Removes a specific property from all the content description contexts in the description list.

SetBroadcastid

Reserved for internal use.

SetPlaylistGenid

Reserved for internal use.

SetValueOnAllDescriptions

Specifies the value of a specific property in all the content description contexts in the description list.

See Also

Concepts

Custom Plug-in Interfaces (C++)