Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSAnnouncementStreamFormats.length (C#)
The length property retrieves the number of items in the IWMSAnnouncementStreamFormats collection.
- Note This property is available only on Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; and Windows Server 2008.
Syntax
int = IWMSAnnouncementStreamFormats .length;
Property Value
int containing the number of items in the collection.
Remarks
This property is read-only. This is the JScript version of the IWMSAnnouncementStreamFormats.Count property. It is included for developers more comfortable with JScript syntax.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPublishingPoints PubPoints;
IWMSPublishingPoint PubPoint;
IWMSBroadcastPublishingPoint BCPubPoint;
IWMSAnnouncementStreamFormats AnnounceStreamFormats;
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 IWMSAnnouncementStreamFormats object.
AnnounceStreamFormats = BCPubPoint.AnnouncementStreamFormats;
// Use the length property as an iteration boundary
// when accessing individual objects in the collection.
for (int j = 0; j < AnnounceStreamFormats.length; j++)
{
//
strName = AnnounceStreamFormats[j];
}
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
| Previous | Next |