IWMSPublishingPoint.CacheProxyExpiration (C#)

banner art

Previous Next

IWMSPublishingPoint.CacheProxyExpiration (C#)

The CacheProxyExpiration property specifies and retrieves the expiration value for cached content

Syntax

  PublishingPoint
  .CacheProxyExpiration
  
  =
  
  int
  ;
  
  int
  
  =
  
  PublishingPoint
  .CacheProxyExpiration;

Property Value

int containing the expiration value.

If this property fails, it throws an exception.

Number Description
0x80070057 int is an invalid argument.
0xC00D145AL The publishing point was already removed.

Remarks

The expiration value is the amount of time, from the moment content was last downloaded, that the content can be streamed. The default value is 86,400 seconds (24 hours).

Example Code

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

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

int                   iValue;

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 the expiration value for cached content.
        iValue = PubPoint.CacheProxyExpiration;

        // Set the expiration value for cached content.
        PubPoint.CacheProxyExpiration = 50000;
    }







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