IWMSPlayers.Refresh (C#)
Previous | Next |
IWMSPlayers.Refresh (C#)
The Refresh method updates the list of IWMSPlayer objects in the IWMSPlayers collection to reflect the connected players.
Syntax
IWMSPlayers .Refresh();
Parameters
This method does not take any parameters.
Return Values
This method does not return a value.
Remarks
Call the Refresh method whenever the IWMSPlayers collection changes. For more information, see the IWMSPlayers.Remove and IWMSPlayers.RemoveAll methods.
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; // Refresh the collection of current connections in // case any states have changed. Players.Refresh(); } 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 |