Share via


IWMSOutgoingDistributionConnections.Item (Visual Basic .NET)

banner art

Previous Next

IWMSOutgoingDistributionConnections.Item (Visual Basic .NET)

The Item property retrieves an IWMSOutgoingDistributionConnection object from the IWMSOutgoingDistributionConnections collection.

Syntax

  IWMSOutgoingDistributionsConnection = 
IWMSOutgoingDistributionsConnections.Item(
  varIndex As Variant
)

Parameters

varIndex

[in] Variant containing an index of an IWMSOutgoingDistributionConnection object.

Property Value

An IWMSOutgoingDistributionConnection object.

Remarks

This property is read-only.

Example Code

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

Private Sub GetDistConnectionItem()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Connections As IWMSOutgoingDistributionConnections
    Dim Connection As IWMSOutgoingDistributionConnection
    Dim strAddress As String

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the IWMSOutgoingDistributionConnections object.
    Connections = Server.OutgoingDistributionConnections

    ' Retrieve information about each distribution connection.
    For i = 0 To Connections.Count - 1
        Connection = Connections.Item(i)

        ' Retrieve the IP address of the client.
        strAddress = Connection.NetworkAddress
    Next i

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