IWMSServerLimits.PlayerBandwidth (C#)

banner art

Previous Next

IWMSServerLimits.PlayerBandwidth (C#)

The PlayerBandwidth property specifies and retrieves the maximum total player bandwidth permitted by the server.

Syntax

  IWMSServerLimits
  .PlayerBandwidth = int;
int = IWMSServerLimits.PlayerBandwidth;

Property Value

int containing the maximum permitted bandwidth, in Kbps.

If this property fails, it throws an exception.

Number Description
0x80070057 int is an invalid argument.

Remarks

If the parameter is –1, there is no limit on the bandwidth. By default, the value of the parameter is –1.

Example Code

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;











    // Retrieve the IWMSServerLimits object for the server.
    ServerLimits = Server.Limits;

    // Retrieve the total bandwidth limit for client connections.
    iValue = ServerLimits.PlayerBandwidth;

    // Set the total bandwidth limit for client connections.
    ServerLimits.PlayerBandwidth = 5068;
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

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