IWMSBroadcastPublishingPoint.AllowClientToStartAndStop (Visual Basic .NET)

banner art

Previous Next

IWMSBroadcastPublishingPoint.AllowClientToStartAndStop (Visual Basic .NET)

The AllowClientToStartandStop property specifies and retrieves a Boolean value that indicates whether a stopped publishing point can be started when a client tries to receive a broadcast from it.

Syntax

  BroadcastPublishingPoint
  .AllowClientToStartAndStop
  
  =
  
  Boolean 
  
  Boolean
  
  =
  
  BroadcastPublishingPoint
  .AllowClientToStartAndStop

Property Value

A Boolean indicating whether the IWMSBroadcastPublishingPoint.Start method must be called when a client attempts to receive a broadcast.

If this property fails, it returns an error number.

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

Remarks

The default value is true. The publishing point will not automatically stop if a broadcast data sink is enabled on that publishing point.

Example Code

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

Private Sub EnableStartStop()

    ' Declare variables.
    Dim Server As WMSServer
    Dim PubPoints As IWMSPublishingPoints
    Dim PubPoint As IWMSPublishingPoint
    Dim BCPubPoint As IWMSBroadcastPublishingPoint
    Dim bVal As Boolean
    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 a Boolean value indicating whether the
    ' publishing point can be started when a client
    ' tries to receive a broadcast.
    bVal = BCPubPoint.AllowClientToStartAndStop

    ' Set the publishing point to begin broadcasting
    ' when the first client connects.
    BCPubPoint.AllowClientToStartAndStop = True










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