IWMSBroadcastPublishingPoint.UpTime (Visual Basic .NET)
The UpTime property retrieves the elapsed time, in seconds, that the publishing point has been running.
Integer = IWMSBroadcastPublishingPoint.UpTime
Property Value
Integer containing the elapsed time, in seconds, that the publishing point has been running.
If this property fails, it returns an error number.
Number |
Description |
---|---|
0xC00D145AL |
The publishing point has already been removed. |
Remarks
This property is read-only. When the StartWithoutData method is used to start a publishing point, this property is not updated. If the publishing point is not started, zero is returned.
Example
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetElapsedTime()
' Declare variables.
Dim Server As WMSServer
Dim PubPoints As IWMSPublishingPoints
Dim PubPoint As IWMSPublishingPoint
Dim BCPubPoint As IWMSBroadcastPublishingPoint
Dim iCount As Integer
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 up-time statistic for the publishing point.
iCount = BCPubPoint.UpTime
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.