IWMSBroadcastPublishingPoint.Start (Visual Basic .NET)
The Start method starts the broadcasting publishing point.
IWMSBroadcastPublishingPoint.Start()
Arguments
This method takes no parameters.
Return Value
If this method succeeds, it does not return a value. If it fails, it returns an error number.
Number |
Description |
---|---|
0x8007000E |
The account that the WMS service is running under does not have access rights to the content requested. |
0x00000002 |
The server was not able to find the file referenced by the Path property of the publishing point. |
0x00000003 |
The server was not able to find the path referenced by the Path property of the publishing point. |
0xC00D0006L |
The destination server indicated in the path property exists, but the server was unable to establish a connection to the destination server. |
0xC00D14B5L |
The playlist that the server is attempting to stream does not reference any media streams or files. |
0xC00D001AL |
The server was not able to find the file referenced by the Path property of the publishing point. |
0xC00D2EE8L |
The server that the publishing point attempted to connect to does not support the requested action. |
0xC00D145BL |
The publishing point is configured for push distribution and can be started only by an encoder. |
0xC00D1581L |
The server cannot stream the selected file because it is either damaged or corrupted. |
0xC00D2EFAL |
The MMS protocol is not supported. |
0xC00D14B6L |
The playlist that the server is attempting to parse contains a syntax error. |
0xC00D157FL |
The server was not able to find a playlist parser plug-in to access the playlist referenced by the Path property of the publishing point. |
0xC00D145AL |
The publishing point has already been removed. |
0xC00D0035L |
The server was not able to find the server specified in the Path property of the publishing point. |
0xC00D157EL |
The server was not able to find a data source plug-in to access the data referenced by the Path property of the publishing point. |
0xC00D151EL |
The version of the playlist that the server is attempting to stream is either not supported by the server or is not valid. Version information in a playlist is indicated by the <WSX> element. |
0x000D1519L |
At least one data sink started but one or more failed to start. |
Remarks
The Start method begins streaming the content referenced in the IWMSPublishingPoint.Path property. If the Path property references a playlist, an IWMSPlaylist object is created, and the publishing point begins streaming the content indicated by the playlist. If the Path property references a file, the server begins streaming content from the file. If the Path property references a directory, the server begins streaming the media files in that directory and subdirectories as if the directory is a playlist.
Example
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub BeginBroadcast()
' Declare variables.
Dim Server As WMSServer
Dim PubPoints As IWMSPublishingPoints
Dim PubPoint As IWMSPublishingPoint
Dim BCPubPoint As IWMSBroadcastPublishingPoint
Dim ppsStatus As WMS_BROADCAST_PUBLISHING_POINT_STATUS
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 current status of the publishing point.
' The status is reported as the result of a bitwise OR
' of any of the designated values.
ppsStatus = BCPubPoint.BroadcastStatus
' If the publishing point is currently stopped, start it.
If ppsStatus = WMS_BROADCAST_PUBLISHING_POINT_STATUS.WMS_BROADCAST_PUBLISHING_POINT_STOPPED Then
BCPubPoint.Start()
End If
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
Reference
IWMSBroadcastPublishingPoint Object (Visual Basic .NET)
IWMSBroadcastPublishingPoint.BroadcastStatus (Visual Basic .NET)
IWMSBroadcastPublishingPoint.Stop (Visual Basic .NET)