IWMSPlayer.NetworkAddress (Visual Basic .NET)
.gif)
| Previous | Next |
IWMSPlayer.NetworkAddress (Visual Basic .NET)
The NetworkAddress property retrieves the network address of the client that is receiving content from the server.
Syntax
String = IWMSPlayer.NetworkAddress
Property Value
A String that contains the network address.
Remarks
This property is read-only. The network address is returned by the socket on the Windows Media server. Therefore, the address can be that of the player receiving the content, but it can also be the address of the firewall, the network address translator, or the router if these are in the network path.
Example Code
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetIPAddress()
' Declare variables.
Dim Server As WMSServer
Dim Players As IWMSPlayers
Dim Player As IWMSPlayer
Dim strAddress 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 IP address of the client.
strAddress = Player.NetworkAddress
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 |