IWMSBroadcastPublishingPoint.StopArchive (C#)
The StopArchive method stops archiving the content streamed by the publishing point.
IWMSBroadcastPublishingPoint.StopArchive();
Arguments
This method takes no parameters.
Return Value
This method does not return a value.
If this method fails, it throws an exception.
Number |
Description |
---|---|
0xC00D145AL |
The publishing point has already been removed. |
Remarks
The StopArchive method only stops the archiving process. If the broadcast publishing point is running, it will continue streaming content to the clients.
Example
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSBroadcastPublishingPoint BCPubPoint;
IWMSPublishingPoints PubPoints;
IWMSPublishingPoint PubPoint;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSPublishingPoints object.
PubPoints = Server.PublishingPoints;
// Retrieve each publishing point and retrieve the
// IWMSBroadcastPublishingPoint object.
for (int i = 0; i < PubPoints.Count; i++)
{
PubPoint = PubPoints[i];
if (PubPoint.Type ==
WMS_PUBLISHING_POINT_TYPE.WMS_PUBLISHING_POINT_TYPE_BROADCAST)
{
BCPubPoint = (IWMSBroadcastPublishingPoint)PubPoint;
// Retrieve the current status of the publishing point.
// The status is reported as the result of a bitwise OR
// of any of the designated values.
WMS_BROADCAST_PUBLISHING_POINT_STATUS ppsStatus;
ppsStatus = BCPubPoint.BroadcastStatus;
// Start or stop archiving data based on the current state.
if (ppsStatus == WMS_BROADCAST_PUBLISHING_POINT_STATUS.WMS_BROADCAST_PUBLISHING_POINT_ARCHIVING)
{
BCPubPoint.StopArchive();
}
else
{
BCPubPoint.StartArchive();
}
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 family, Windows Server 2008 family.
See Also
Reference
IWMSBroadcastPublishingPoint Object (C#)