IWMSBroadcastPublishingPoint2 Object (C#)

banner art

Previous Next

IWMSBroadcastPublishingPoint2 Object (C#)

You can use the IWMSBroadcastPublishingPoint2 object to enable Startup Profile and to automatically restart a broadcast publishing point whenever windows Media Services starts.

  • **Note   ** Except for Windows Server 2003, Web Edition, this object is available only on the x64-based versions of Windows Server 2003 and on the 32-bit versions of Windows Server 2003 with Service Pack 1. Not all editions of Windows Server 2003 support both properties of this object. Check the platform requirements at the bottom of the reference page for each property to learn which editions of Windows Server 2003 support each property.
    This object is also available on Window Server 2008.

In addition to the methods and properties inherited from the IWMSBroadcastPublishingPoint object, the IWMSBroadcastPublishingPoint2 object exposes the following properties.

Property Description
AllowStartupProfile Specifies and retrieves a Boolean value that indicates whether the publishing point allows clients to use Startup Profile.
EnableStartVRootOnServiceStart Specifies and retrieves a Boolean value that indicates whether the publishing point automatically starts when Windows Media Services starts.

Example Code

The following example illustrates how to retrieve an IWMSBroadcastPublishingPoint2 object.

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

// Declare variables.
IWMSServer                    Server = null;
IWMSPublishingPoints          PubPoints = null;
IWMSPublishingPoint           PubPoint = null;
IWMSBroadcastPublishingPoint2 BCPubPoint2 = null;

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

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

    // Retrieve each publishing point and retrieve the
    // IWMSBroadcastPublishingPoint2 object.
    for (int i = 0; i < PubPoints.Count; i++)
    {
        PubPoint = PubPoints[i];

        if (PubPoint.Type == 
            WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_BROADCAST)
        {
            BCPubPoint2 = (IWMSBroadcastPublishingPoint2)PubPoint;
            break;
        }
    }
}
catch (COMException comExc) 
{
    // TODO: Handle COM exceptions.
}
catch (Exception e) 
{
    // TODO: Handle exceptions.
}

See Also

Previous Next