IWMSAdminMulticastSink.MulticastTtl (C#)

banner art

Previous Next

IWMSAdminMulticastSink.MulticastTtl (C#)

The MulticastTtl property specifies and retrieves the maximum number of intermediate router hops permitted for the multicast transmission.

Syntax

  IWMSAdminMulticastSink
  .MulticastTtl = int;
int = IWMSAdminMulticastSink.MulticastTtl;

Property Value

int containing the time-to-live (TTL) value. This value cannot be less than zero or greater than 255.

If this property fails, it throws an exception.

Number Description
0x80070057 The parameter is less than zero or greater than 255.

Example Code

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

// Declare variables.
WMSServer Server;
IWMSBroadcastPublishingPoint BCPubPoint;
IWMSPlugin Plugin;
IWMSAdminMulticastSink AdminMulticastSink;

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

    // Add a new broadcast publishing point.
    BCPubPoint = (IWMSBroadcastPublishingPoint)
                 Server.PublishingPoints.Add("NewPubPoint",
                                           WMS_PUBLISHING_POINT_CATEGORY.
                                           WMS_PUBLISHING_POINT_BROADCAST,
                                           "Push:*");

    // Retrieve the plug-in to be configured.
    Plugin = BCPubPoint.BroadcastDataSinks[
                             "WMS Multicast Data Writer"];

    // Retrieve the custom interface of the plug-in.
    AdminMulticastSink =
        (IWMSAdminMulticastSink)Plugin.CustomInterface;

    // Set the maximum number of intermediate
    // router hops permitted for the multicast broadcast.
    AdminMulticastSink.MulticastTTL = 20;
}
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, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008 Enterprise; Windows Server 2008 Datacenter.

See Also

Previous Next