IWMSContentDescriptionList.GetDescriptionCount (Visual Basic .NET)

The GetDescriptionCount method retrieves the number of content description contexts in the description list.

IWMSContentDescriptionList.GetDescriptionCount(  ByRef pdwNumDescriptions As UInt32
)

Arguments

Reference to a UInt32 containing the number of contexts in the list.

Return Value

This method does not return a value.

If this method fails, it throws an exception.

Number

Description

0x80070057

pdwNumDescriptions is null.

Example

Dim Context As IWMSContext
Dim ContentDescList As IWMSContentDescriptionList
Dim pUnknown As IntPtr
Dim uCount As UInt32

Try
    m_ClassFactory.AllocIWMSContext(GetType(IWMSContext).GUID, _
                                 WMS_CONTEXT_TYPE.WMS_USER_CONTEXT_TYPE, _
                                 pUserContext, pUnknown)
    Context = Marshal.GetTypedObjectForIUnknown(pUnknown, _
                                                GetType(IWMSContext))

    m_ClassFactory.CreateInstance( _
                       GetType(IWMSContentDescriptionList).GUID, pUnknown)
    ContentDescList = Marshal.GetTypedObjectForIUnknown(pUnknown, _
                                      GetType(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.GetDescriptionCount(uCount)

Catch e As Exception
    ' TODO: Handle exceptions.
End Try

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

Concepts

IWMSContentDescriptionList Object (Visual Basic .NET)