IWMSPublishingPoints.Remove (C#)
Previous | Next |
IWMSPublishingPoints.Remove (C#)
The Remove method removes a specific IWMSPublishingPoint object from the IWMSPublishingPoints collection.
Syntax
IWMSPublishingPoints .Remove( object varIndex );
Parameters
varIndex
[in] object containing either the name or index of the publishing point to remove.
Return Values
This method does not return a value.
If this method fails, it throws an exception.
Number | Description |
0x8002000B | varIndex is an invalid index location. |
0xC00D1450L | A cache proxy publishing point cannot be removed. |
Remarks
You can use the IWMSPublishingPoint.Name property to retrieve the name of a plug-in. You cannot remove either the cache or proxy plug-ins that are created when the server is installed. This method will disconnect all clients for both an on-demand and broadcast publishing point.
A forward slash mark (/) cannot be used as the leading or trailing character unless it is the only character.
Example Code
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Declare variables. WMSServer Server; IWMSPublishingPoints PubPoints; try { // Create a new WMSServer object. Server = new WMSServerClass(); // Retrieve the IWMSPublishingPoints object. PubPoints = Server.PublishingPoints; // Remove the publishing point with the specified name. PubPoints.Remove ("Pub Point Name"); } 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 |