Share via


IWMSContentDescriptionList.GetIndexedDescription (C#)

banner art

Previous Next

IWMSContentDescriptionList.GetIndexedDescription (C#)

The GetIndexedDescription method retrieves a specific content description context from the description list by index.

Syntax

  

Parameters

dwDescriptionNum

uint containing the index.

pstrLanguage

Reference to a string specifying a national language.

ppDescription

Reference to an IWMSContext object containing the content description context.

Return Values

This method does not return a value.

If this method fails, it throws an exception.

Number Description
0x80070057 pstrLanguage or ppDescription is null.
0x80070057 dwDescriptionNum is not a valid index.

Example Code

Guid ContextGuid = typeof(IWMSContext).GUID;
Guid ContentDescListGuid = typeof(IWMSContentDescriptionList).GUID;
IWMSContext                 Context;
IWMSContentDescriptionList  ContentDescList;
IntPtr                      pUnknown;
            
try
{          
    m_ClassFactory.AllocIWMSContext(ref ContextGuid,
                                   WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE,
                                   pUserContext, out pUnknown);
    Context = (IWMSContext)Marshal.GetTypedObjectForIUnknown(pUnknown,
                                                     typeof(IWMSContext));
            
    m_ClassFactory.CreateInstance(ref ContentDescListGuid, out pUnknown);
    ContentDescList =
            (IWMSContentDescriptionList)Marshal.GetTypedObjectForIUnknown(
                            pUnknown, typeof(IWMSContentDescriptionList));

    Context.SetStringValue(WMSDefines.WMS_CONTENT_DESCRIPTION_TITLE,
                           WMSDefines.WMS_CONTENT_DESCRIPTION_TITLE_ID,
                           "My Title", 0);
    Context.SetLongValue(WMSDefines.WMS_CONTENT_DESCRIPTION_NO_SKIP,
                         WMSDefines.WMS_CONTENT_DESCRIPTION_NO_SKIP_ID,
                         1, 0);

    ContentDescList.AppendDescription("en-us", Context);
    ContentDescList.GetIndexedDescription(0, "en-us", Context);
}
catch( Exception e )
{
    // TODO: Handle exceptions.
}

Requirements

Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.

See Also

Previous Next