IWMSIPList.length (C#)
Previous | Next |
IWMSIPList.length (C#)
The length property retrieves the number of IWMSIPEntry objects in the IWMSIPList collection. It is provided to allow access from JScript.
Syntax
int = IWMSIPList. length;
Property Value
int containing the number of objects.
Remarks
This is the JScript version of the IWMSIPList.Count method. It is provided for developers more comfortable with JScript syntax.
Example Code
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Declare variables. WMSServer Server; IWMSPlugin Plugin; IWMSIPAdmin IPAdmin; IWMSIPList IPList; IWMSIPEntry IPEntry; try { // Create a new WMSServer object. Server = new WMSServerClass(); // Retrieve the plug-in to be configured. Plugin = Server.EventHandlers[ "WMS IP Address Authorization"]; // Retrieve the custom interface of the plug-in. IPAdmin = (IWMSIPAdmin)Plugin.CustomInterface; // Retrieve the list of banned IP addresses. IPList = IPAdmin.DisallowIP; // Retrieve the total count of banned IPs. int iCount = IPList.length; } 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 |