IWMSAdminUnicastSink.MinClientPacketSize (Visual Basic .NET)

banner art

Previous Next

IWMSAdminUnicastSink.MinClientPacketSize (Visual Basic .NET)

The MinClientPacketSize property specifies and retrieves the minimum value of the packet size that a client can request.

Syntax

  IWMAdminUnicastSink
  .MinClientPacketSize = Integer
Integer = IWMSAdminUnicastSink.MinClientPacketSize

Property Value

An Integer containing the minimum packet size.

Remarks

This property can be used to specify the minimum value at which the IWMSAdminUnicastSink.MaximumPacketSize property can be set. The maximum packet size that can be sent is 65,535 bytes. The minimum is 100 bytes. A value of zero indicates that the default size in the file is used.

Example Code

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

Private Sub GetMinPacketSize()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugin As IWMSPlugin
    Dim AdminUnicastSink As IWMSAdminUnicastSink
    Dim iMinPacketSize As Integer

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

    ' Retrieve the plug-in to be configured.
    Plugin = Server.UnicastDataSinks.Item("WMS Unicast Data Writer")

    ' Retrieve the custom interface of the plug-in.
    AdminUnicastSink = Plugin.CustomInterface

    ' Retrieve the minimum packet size.
    iMinPacketSize = AdminUnicastSink.MinClientPacketSize

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