Share via


IWMSBroadcastPublishingPoint.BroadcastDataSinks (Visual Basic .NET)

banner art

Previous Next

IWMSBroadcastPublishingPoint.BroadcastDataSinks (Visual Basic .NET)

The BroadcastDataSinks property retrieves an IWMSPlugins collection containing broadcast data sink plug-ins that can be used to send content to a client.

Syntax

  IWMSPlugins = IWMSBroadcastPublishingPoint.BroadcastDataSinks

Property Value

An IWMSPlugins object.

If this property fails, it returns an error number.

Number Description
0xC00D145AL The publishing point has already been removed.

Remarks

You must use the IWMSBroadcastPublishingPoint.Start method to begin sending content to the client. Only one multicast data sink plug-in can be enabled at any time. This property is accessible through the plug-in's IWMSNamedValues collection.

Example Code

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub GetPlugins()

    ' Declare variables.
    Dim Server As WMSServer
    Dim PubPoints As IWMSPublishingPoints
    Dim PubPoint As IWMSPublishingPoint
    Dim BCPubPoint As IWMSBroadcastPublishingPoint
    Dim Plugins As IWMSPlugins
    Dim i As Integer

Try

    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints

    ' Retrieve each publishing point and retrieve the
    ' IWMSBroadcastPublishingPoint object.
    For i = 0 To Server.PublishingPoints.Count – 1

        PubPoint = PubPoints.Item(i)
        If PubPoint.Type = WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_BROADCAST Then
            BCPubPoint = PubPoint
            Exit For
        End If
    Next i

    ' Retrieve the IWMSPlugins object
    ' containing broadcast data sink plug-ins.
    Plugins = BCPubPoint.BroadcastDataSinks

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch exc As Exception
    ' TODO: Handle errors.
Finally
    ' TODO: Clean-up code goes here.
End Try

End Sub

Requirements

Reference: Add a reference to Microsoft.WindowsMediaServices.

Namespace: Microsoft.WindowsMediaServices.Interop.

Assembly: Microsoft.WindowsMediaServices.dll.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003 family, Windows Server 2008 family.

See Also

Previous Next