IWMSOutgoingDistributionConnections.Remove (C#)
.gif)
| Previous | Next |
IWMSOutgoingDistributionConnections.Remove (C#)
The Remove method removes an IWMSOutgoingDistributionConnection object from the IWMSOutgoingDistributionConnections collection.
Syntax
IWMSOutgoingDistributionConnections .Remove( object varIndex );
Parameters
varIndex
[in] object containing the index of the IWMSOutgoingDistributionConnection object to be removed.
Return Values
This method does not return a value.
If this method fails, it throws an exception.
| Number | Description |
| 0x8002000B | Indicates that varIndex is an invalid index location. |
Remarks
If you have created a previous instance of the collection, you must call IWMSOutgoingDistributionConnections.Refresh to update the object.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSOutgoingDistributionConnections Connections;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSOutgoingDistributionConnections object.
Connections = Server.OutgoingDistributionConnections;
// Remove the first connection from the collection.
Connections.Remove (0);
}
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
- IWMSOutgoingDistributionConnection Object (C#)
- IWMSOutgoingDistributionConnections Object (C#)
- IWMSOutgoingDistributionConnections.RemoveAll (C#)
| Previous | Next |