IWMSPublishingPoint.WrapperPath (C#)

banner art

Previous Next

IWMSPublishingPoint.WrapperPath (C#)

The WrapperPath property specifies and retrieves the path to a wrapper playlist file.

Syntax

  IWMSPublishingPoint
  .WrapperPath = string;
string = IWMSPublishingPoint.WrapperPath;

Property Value

A string containing the playlist.

If this property fails, it throws an exception.

Number Description
0x8007000E There is insufficient memory to complete the function.
0x000000A1 string does not reference a file with a valid playlist extension.
0xC00D145AL The publishing point was already removed.
0xC00D1452L The method is not supported for cache proxy publishing points.

Remarks

This method is not supported for cache proxy publishing points.

A wrapper playlist can contain references to media files that are streamed before and after the content requested by the client. Hence, the media files wrap the requested content. You can use a wrapper playlist to guarantee that every client connected to a publishing point renders specific content. In the following wrapper playlist example, media content is inserted before and after the requested content indicated by the "%url%" placeholder.

<seq>
     <media src = "c:\wmpub\wmroot\content1.wmv"
     <media src = "%url%"
     <media src = "c:\wmpub\wmroot\content2.wmv"
</seq>

Example Code

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

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

string                 strText;

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 path to the wrapper playlist.
        strText = PubPoint.WrapperPath;

        // Set the path to the wrapper playlist.
        strText = "c:\\wmpub\\wmroot\\wrapper.wsx";
        PubPoint.WrapperPath = strText;
    }
}
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