Share via


IWMSPlayer.ResolvedURL (Visual Basic .NET)

banner art

Previous Next

IWMSPlayer.ResolvedURL (Visual Basic .NET)

The ResolvedURL property retrieves the URL of the content that is being streamed to the player.

Syntax

  String = IWMSPlayer.ResolvedURL

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

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

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub GetResolvedURL()

    ' 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 resolved URL of the client.
        strURL = Player.ResolvedURL
    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