IWMSPublishingPoint.Status (Visual Basic .NET)

banner art

Previous Next

IWMSPublishingPoint.Status (Visual Basic .NET)

The Status property retrieves the publishing point status.

Syntax

  WMS_SERVER_STATUS = IWMSPublishingPoint.Status

Property Value

A member of a WMS_PUBLISHING_POINT_STATUS enumeration value that indicates the status. This must be one of the following values.

Value Description
WMS_PUBLISHING_POINT_ERROR An authentication or authorization plug-in has failed.
WMS_PUBLISHING_POINT_ERROR_CRITICAL An error has occurred on a plug-in.
WMS_PUBLISHING_POINT_RUNNING The publishing point is running and accepting all client connections.

If this property fails, it returns an error number.

Number Description
0xC00D145AL The publishing point was already removed.

Remarks

This property is read-only.

Example Code

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

Private Sub GetPubPointStatus()

    ' Declare variables.
    Dim Server As WMSServer
    Dim PubPoints As IWMSPublishingPoints
    Dim PubPoint As IWMSPublishingPoint
    Dim ppsStatus As WMS_PUBLISHING_POINT_STATUS

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

    ' Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints

    ' Retrieve information about each publishing point.
    For Each PubPoint In PubPoints

        ' Retrieve the status of the server.
        ppsStatus = PubPoint.Status
        If ppsStatus = WMS_PUBLISHING_POINT_STATUS.WMS_PUBLISHING_POINT_RUNNING Then
            ' TODO: Handle running status.
        ElseIf ppsStatus = WMS_PUBLISHING_POINT_STATUS.WMS_PUBLISHING_POINT_ERROR Then
            ' TODO: Handle error status.
        ElseIf ppsStatus = WMS_PUBLISHING_POINT_STATUS.WMS_PUBLISHING_POINT_ERROR_CRITICAL Then
            ' TODO: Handle critical error status.
        End If

    Next

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