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 |
IWMSPlugins.Remove (Visual Basic .NET)
The Remove method removes an IWMSPlugin object from the IWMSPlugins collection.
Syntax
IWMSPlugins .Remove( varIndex As Variant )
Parameters
varIndex
[in] Variant containing the index or name of the IWMSPlugin object to remove.
Return Values
If this method succeeds, it does not return a value. If this method it fails, it returns an error number.
| Number | Description |
| 0x8002000B | varIndex is an invalid index location. |
| 0xC00D1451L | The plug-in could not be removed. |
| 0xC00D1457L | The plug-in cannot be removed while the publishing point is running. |
Remarks
This method causes the WMS_PLUGIN_REMOVE_ON_SERVICE_RESTART flag to be set. Setting this flag indicates that the plug-in is to be removed when Windows Media server is restarted. The WMS_PLUGIN_REMOVE_ON_SERVICE_RESTART flag can be cleared by setting the plug-in's Enabled property to True.
You can use the IWMSPlugin.Name method to find the plug-in name.
You cannot use the Remove method to remove the last instance of a system plug-in. For a plug-in implemented as a DLL, you can use RegSvr32.exe instead.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub RemovePlugin()
' Declare variables.
Dim Server As WMSServer
Dim Plugins As IWMSPlugins
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve the IWMSPlugins object.
Plugins = Server.EventHandlers
' Set the first plug-in in the collection
' to be removed when the server restarts.
Plugins.Remove(0)
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
- IWMSPlugin Object (Visual Basic .NET)
- IWMSPlugin.Name (Visual Basic .NET)
- IWMSPlugins Object (Visual Basic .NET)
| Previous | Next |