IWMSPublishingPoints.Remove (Visual Basic .NET)

banner art

Previous Next

IWMSPublishingPoints.Remove (Visual Basic .NET)

The Remove method removes a specific IWMSPublishingPoint object from the IWMSPublishingPoints collection.

Syntax

  IWMSPublishingPoints
  .Remove(
  varIndex As Variant
)

Parameters

varIndex

[in] Variant 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 returns an error number.

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

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub RemovePubPoint()

    ' Declare variables.
    Dim Server As WMSServer
    Dim PubPoints As IWMSPublishingPoints

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints

    ' Remove the publishing point with the specified name.
    PubPoints.Remove("Pub Point Name")

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch exc As Exception
    ' TODO: Handle errors.
Finally
    ' TODO: Clean-up code goes here.
End Try

End Sub

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