IWMSPublishingPoint.AllowPlayerSideDiskCaching (C#)

banner art

Previous Next

IWMSPublishingPoint.AllowPlayerSideDiskCaching (C#)

The AllowPlayerSideDiskCaching property specifies and retrieves a Boolean value that indicates whether the publishing point allows clients to cache content locally whenever the bandwidth of the connection exceeds the encoded bit rate of the on-demand content. This allows the player to minimize the effects of temporary reductions in network throughput.


  .AllowPlayerSideDiskCaching = 

  bool = IWMSPublishingPoint

Property Value

A bool indicating whether the publishing point allows clients to cache content locally. By default, this parameter is true.

If this property fails, it throws an exception.

Number Description
0xC00D145AL The publishing point was already removed.

Example Code

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

// Declare variables.
WMSServer              Server;
IWMSPublishingPoints   PubPoints;
IWMSPublishingPoint    PubPoint;

bool                   bVal;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints;

    // Retrieve information about each publishing point.
    for (int i = 0; i < PubPoints.Count; i++)
        PubPoint = PubPoints[i];

        // Retrieve a Boolean value indicating whether
        // client-side disk caching is allowed.
        bVal = PubPoint.AllowPlayerSideDiskCaching;

        // Set a Boolean value indicating that
        // client-side disk caching is not allowed.
        PubPoint.AllowPlayerSideDiskCaching = false;
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
catch (Exception e) {
    // TODO: Handle exceptions.


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