IWMSPublishingPoint.Path (C#)
The Path property specifies and retrieves the path to the publishing point content.
IWMSPublishingPoint.Path = string;
string = IWMSPublishingPoint.Path;
Property Value
A string containing the path.
If this property fails, it throws an exception.
Number |
Description |
---|---|
0x8007000E |
There is insufficient memory to complete the function. |
0xC00D002BL |
The path for a publishing point cannot be changed while the publishing point is running. |
0xC00D145AL |
The publishing point was already removed. |
0xC00D1452L |
The method is not supported for cache proxy publishing points. |
Remarks
The path must start with an appropriate prefix to indicate which data source plug-in to use. The following table provides examples of valid paths.
Path |
Example |
---|---|
Media file |
file:://C:\wmpub\wmroot\movie.wmv file://\\server\directory\movie.wmv |
Playlist file |
file:://C:\wmpub\wmroot\playlist.wsx file://\\server\directory\playlist.wsx |
Stream from an encoder |
http://encoder:port |
Stream pushed to an encoder |
push:* |
Content from a publishing point on a local server |
lpp://pubpoint/media.wmv |
Stream from a publishing point on a local or remote server |
rtsp://server/pubpoint https://server/pubpoint |
Stream from a station or publishing point on a version 4.1 server |
https://server/stationname https://server/pubpoint |
Media file or playlist on a local or remote server |
rtsp://server/pubpoint/movie.wmv |
Playlist file from a Web server |
https://server/playlist.asp https://server/playlist.wsx |
Directory of files |
file://C:\wmpub\wmroot\directory |
Multicast announcement file |
MCast://c:\wmpub\wmroot\file.nsc. Relative URLs cannot be used to specify this path. |
Example
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 content path of the publishing point.
strText = PubPoint.Path;
// Set the content path of the publishing point.
strText = "c:\\wmpub\\wmroot\\";
PubPoint.Path = 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.