IWMSAdminMulticastSink.DataProtocol (C#)
The DataProtocol property specifies and retrieves the data protocol for the multicast.
IWMSAdminMulticastSink.DataProtocol = string;string = IWMSAdminMulticastSink.DataProtocol;
Property Value
A string containing the name of the supported protocol. The protocol is MSB.
If this property fails, it throws an exception.
Number |
Description |
---|---|
0x8007000E |
The server could not allocate memory to copy the data protocol to a local variable. |
Remarks
Multiple protocols must be separated by semicolons.
Example
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 protocol used to broadcast a multicast connection.
AdminMulticastSink.DataProtocol = "MSB";
}
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.