IWMSPlayer.RequestedURL (Visual Basic .NET)
Previous | Next |
IWMSPlayer.RequestedURL (Visual Basic .NET)
The RequestedURL property retrieves the URL that the player used to request a connection.
Syntax
String = IWMSPlayer.RequestedURL
When getting the value, this property returns a String that contains the URL.
Property Value
A String that contains the URL.
If this property fails, it returns an error number.
Number | Description |
0x8002000B | The value does not exist. |
Remarks
This property is read-only. The URL that is 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
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub GetRequestedURL() ' Declare variables. Dim Server As WMSServer Dim Players As IWMSPlayers Dim Player As IWMSPlayer Dim strURL As String Try ' Create the WMSServer object. Server = New WMSServer() ' Retrieve the IWMSPlayers object. Players = Server.Players ' Retrieve information about each client connection. For Each Player In Players ' Retrieve the requested URL of the client. strURL = Player.RequestedURL Next 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 |