IWMSPlayers.RemoveAll (C#)
Previous | Next |
IWMSPlayers.RemoveAll (C#)
The RemoveAll method disconnects all players from the server and removes them from the IWMSPlayers collection.
Syntax
IWMSPlayers .RemoveAll();
Parameters
This method does not take any parameters.
Return Values
This method does not return a value.
Remarks
If you created a previous instance of the IWMSPlayers collection, you must call IWMSPlayers.Refresh to update the object.
Example Code
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Declare variables. WMSServer Server; IWMSPlayers Players; try { // Create a new WMSServer object. Server = new WMSServerClass(); // Retrieve the IWMSPlayers object. Players = Server.Players; // Remove all of the connections from the collection. Players.RemoveAll(); } 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 |