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 |
IWMSPlayer.ResolvedURL (C#)
The ResolvedURL property retrieves the URL of the content being streamed to the player.
Syntax
string = IWMSPlayer.ResolvedURL;
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
The URL identifies the location of the content. For example, file://c:\wmpub\wmroot\movie.wmv indicates that the content resides in the movie.wmv file in the c:\wmpub\wmroot\ directory.
This property is read-only.
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 resolved URL of the client.
strURL = Player.ResolvedURL;
}
}
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 |