IWMSServerTotalCounters.Advertisements (C#)

banner art

Previous Next

IWMSServerTotalCounters.Advertisements (C#)

The Advertisements property retrieves the cumulative number of advertisements that have been streamed from playlists since the last reset.

Syntax

  int =
  
  ServerTotalCounters
  .Advertisements;

Property Value

int containing the cumulative number of advertisements that have been streamed.

Remarks

This property is read-only. When the server starts streaming from a playlist in which the role attribute has been set to Advertisement, the counters should be updated. The value specified for the role attribute can be accesed through the presentation context WMS_PRESENT_PLAYLIST_ENTRY_ROLE property.

Example Code

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











    // Retrieve a list of total statistics for the server.
    TotalCounters = Server.TotalCounters;

    // Retrieve the total number of advertisements
    // that have streamed since the start time.
    iValue = TotalCounters.Advertisements;







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