Share via


IWMSBroadcastPublishingPoint2.EnableStartVRootOnServiceStart (C#)

banner art

Previous Next

IWMSBroadcastPublishingPoint2.EnableStartVRootOnServiceStart (C#)

The EnableStartVRootOnServiceStart property specifies and retrieves a Boolean value that indicates whether the publishing point automatically starts when Windows Media Services starts.

  • Note   Except for Windows Server 2003, Web Edition, this property 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. This property is also available on Windows Server 2008.

Syntax

  BroadcastPublishingPoint2
  .EnableStartVRootOnServiceStart
  
  =
  
  bool
  ;
  
  bool
  
  =
  
  BroadcastPublishingPoint2
  .EnableStartVRootOnServiceStart;

Property Value

A bool that indicates whether the publishing point automatically starts when Windows Media Services starts.

Remarks

The default value is false.

Example Code

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

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

bool                          bVal;

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;

            // Retrieve a Boolean value indicating whether the broadcast
            // publishing point will start when Windows Media Services
            // starts.
            bVal = BCPubPoint2.EnableStartVRootOnServiceStart;

            // Set a Boolean value indicating that the broadcast
            // publishing point will start when Windows Media Services
            // starts.
            BCPubPoint2.EnableStartVRootOnServiceStart= true;
            break;
        }
    }
}
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, Standard Edition, with Service Pack 1; Windows Server 2003, Enterprise Edition with Service Pack 1; Windows Server 2003, Datacenter Edition with Service Pack 1; Windows Server 2008.

See Also

Previous Next