Share via


IWMSAdminMulticastSink.DestinationMulticastIPAddress (C#)

banner art

Previous Next

IWMSAdminMulticastSink.DestinationMulticastIPAddress (C#)

The DestinationMulticastIPAddress property specifies and retrieves the IP address to which a multicast broadcast is sent.

Syntax

  IWMSAdminMulticastSink
  .DestinationMulticastIPAddress = string;
string = IWMSAdminMulticastSink.DestinationMulticastIPAddress;

Property Value

A string value containing the IP address.

If this property fails, it throws an exception.

Number Description
0x80004005 The multicast address could not be validated and resolved, or the scope has been specified and this property is read only.

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 IP address where the multicast broadcast will be sent.
    AdminMulticastSink.DestinationMulticastIPAddress = "172.98.34.2";
}
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