IWMSPlayers.Remove (Visual Basic .NET)
Previous | Next |
IWMSPlayers.Remove (Visual Basic .NET)
The Remove method disconnects a specific player from the server and removes it from the IWMSPlayers collection.
Syntax
IWMSPlayers .Remove( varIndex As Variant )
Parameters
varIndex
[in] Variant that specifies the item to be removed from the collection.
Return Values
If this method succeeds, it does not return a value. If this method fails, it returns an error number.
Number | Description |
0x8002000B | varIndex is an invalid index location. |
Remarks
If you created a previous instance of the IWMSPlayers collection, you must call IWMSPlayers.Refresh to update the object.
Example Code
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub RemoveConnection() ' Declare variables. Dim Server As WMSServer Dim Players As IWMSPlayers Try ' Create the WMSServer object. Server = New WMSServer() ' Retrieve the IWMSPlayers object. Players = Server.Players ' Remove the first connection from the collection. Players.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
Previous | Next |