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 |
IWMSIPEntry.Address (C#)
The Address property specifies and retrieves the IP address.
Syntax
IWMSIPEntry .Address = string; string = IWMSIPEntry.Address;
Property Value
A string containing an IP address in either IPv4 decimal notation, xxx.xxx.xxx.xxx, or IPv6 hexadecimal notation, xxxx:xxxx::x.
If this property fails, it throws an exception.
| Number | Description |
| 0x8007000E | The server could not allocate memory. |
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSIPAdmin IPAdmin;
IWMSIPList IPList;
IWMSIPEntry IPEntry;
string strIPAddress;
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 information associated
// with each banned address.
for(int i = 0; i < IPList.Count; i++)
{
IPEntry = IPList[i];
strIPAddress = IPEntry.Address;
}
}
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 |