Share via


IWMSServerLimits.CPUUtilizationDuringConnection (C#)

banner art

Previous Next

IWMSServerLimits.CPUUtilizationDuringConnection (C#)

The CPUUtilizationDuringConnection property specifies and retrieves the maximum CPU utilization permitted before new client connections to the server are denied.

Syntax

  IWMSServerLimits
  .CPUUtilizationDuringConnection = int;
int = IWMSServerLimits.CPUUtilizationDuringConnection

Property Value

int containing the maximum percentage utilization from 0 to 100.

If this property fails, it throws an exception.

Number Description
0x80070057 int is an invalid argument.

Remarks

By default, the value of the parameter is 100.

Example Code

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











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

    // Retrieve the maximum CPU utilization allowed before
    // new client connections to the server are denied.
    iValue = ServerLimits.CPUUtilizationDuringConnection;

    // Set the maximum CPU utilization allowed before
    // new client connections to the server are denied.
    ServerLimits.CPUUtilizationDuringConnection = 75;
}
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