IWMSPublishingPoint.Status (C#)

banner art

Previous Next

IWMSPublishingPoint.Status (C#)

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 type 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 throws an exception.

Number Description
0xC00D145AL The publishing point was already removed.

Remarks

This property is read-only.

Example Code

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer              Server;
IWMSPublishingPoints   PubPoints;
IWMSPublishingPoint    PubPoint;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints;

    // Retrieve information about each publishing point.
    for (int i = 0; i < PubPoints.Count; i++)
    {
        PubPoint = PubPoints[i];

        // Retrieve the status of the publishing point.
        WMS_PUBLISHING_POINT_STATUS ppsStatus;
        ppsStatus = PubPoint.Status;

        if (ppsStatus ==   
              WMS_PUBLISHING_POINT_STATUS.WMS_PUBLISHING_POINT_RUNNING)
        {
            // TODO: Handle running status.
        }
        else if (ppsStatus ==  
              WMS_PUBLISHING_POINT_STATUS.WMS_PUBLISHING_POINT_ERROR)
        {
            // TODO: Handle error status.
        }
        else if (ppsStatus ==
          WMS_PUBLISHING_POINT_STATUS.WMS_PUBLISHING_POINT_ERROR_CRITICAL)
        {
            // TODO: Handle critical error status.
        }
    }
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

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