Share via


IWMSBroadcastPublishingPoint2 Object (Visual Basic .NET)

banner art

Previous Next

IWMSBroadcastPublishingPoint2 Object (Visual Basic .NET)

You can use the IWMSBroadcastPublishingPoint2 object to enable Startup Profile and to automatically restart a broadcast publishing point whenever Windows Media Services starts.

  • Note   Except for Windows Server 2003, Web Edition, this object is available only on the x64-based versions of Windows Server 2003 and on the 32-bit versions of Windows Server 2003 with Service Pack 1. Not all editions of Windows Server 2003 support both properties of this object. Check the platform requirements at the bottom of the reference page for each property to learn which editions of Windows Server 2003 support each property.
    This object is also available on Windows Server 2008.

In addition to the methods and properties inherited from the IWMSBroadcastPublishingPoint object, the IWMSBroadcastPublishingPoint2 object exposes the following properties.

Property Description
AllowStartupProfile Specifies and retrieves a Boolean value that indicates whether the publishing point allows clients to use Startup Profile.
EnableStartVRootOnServiceStart Specifies and retrieves a Boolean value that indicates whether the publishing point automatically starts when Windows Media Services starts.

Example Code

The following example illustrates how to retrieve an IWMSBroadcastPublishingPoint2 object.

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

Private Sub RetrieveObj()

    ' Declare variables.
    Dim Server As IWMSServer
    Dim PubPoints As IWMSPublishingPoints
    Dim PubPoint As IWMSPublishingPoint
    Dim BCPubPoint2 As IWMSBroadcastPublishingPoint2
    Dim i As Integer

    Try

        ' Create a new WMSServer object.
        Server = New WMSServerClass

        ' Retrieve the IWMSPublishingPoints object.
        PubPoints = Server.PublishingPoints

        ' Retrieve each publishing point and retrieve the
        ' IWMSBroadcastPublishingPoint2 object.
        For i = 0 To PubPoints.Count - 1

            PubPoint = PubPoints.Item(i)

            If PubPoint.Type = WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_BROADCAST Then
                BCPubPoint2 = PubPoint
                Exit For
            End If
        Next i

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

End Sub

See Also

Previous Next