IWMSPlayer.RequestedURL (C#)
.gif)
| Previous | Next |
IWMSPlayer.RequestedURL (C#)
The RequestedURL property retrieves the URL that the player used to request a connection.
Syntax
string = IWMSPlayer.RequestedURL;
Property Value
A string containing the URL.
If this property fails, it throws an exception.
| Number | Meaning |
| 0x8002000B | Indicates the value does not exist. |
Remarks
This property is read-only. The URL returned by the RequestedURL property can be different than that requested by the player. For example, if the player requests mms://ServerName/movie.wmv, the RequestedURL property can return either mmsu://ServerName/movie.wmv or mmst://ServerName/movie.wmv, depending on the type of connection used by the session.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlayers Players;
IWMSPlayer Player;
string strURL;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSPlayers object.
Players = Server.Players;
// Retrieve information about each client connection.
for (int i = 0; i < Players.Count; i++)
{
Player = Players[i];
// Retrieve the requested URL of the client.
strURL = Player.RequestedURL;
}
}
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 |