Share via


IWMSPublishingPoint.CacheProxyExpiration (Visual Basic .NET)

banner art

Previous Next

IWMSPublishingPoint.CacheProxyExpiration (Visual Basic .NET)

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

Syntax

  PublishingPoint
  .CacheProxyExpiration
  
  =
  
  Integer
  
  Integer
  
  =
  
  PublishingPoint
  .CacheProxyExpiration

Property Value

Integer containing the expiration value.

If this property fails, it returns an error number.

Number Description
0x80070057 Integer 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

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

Private Sub GetSetExpiration()

    ' Declare variables.
    Dim Server As WMSServer
    Dim PubPoints As IWMSPublishingPoints
    Dim PubPoint As IWMSPublishingPoint
    Dim iValue As Integer

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

    ' Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints

    ' Retrieve information about each publishing point.
    For Each PubPoint In PubPoints

        ' Retrieve the expiration value for cached content.
        iValue = PubPoint.CacheProxyExpiration

        ' Set the expiration value for cached content.
        PubPoint.CacheProxyExpiration = 50000

    Next










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