IWMSPublishingPoint.get_FileDescriptions (C#)
Previous | Next |
IWMSPublishingPoint.get_FileDescriptions (C#)
The FileDescriptions property retrieves an IWMSFileDescriptions collection containing information about files, directories, and playlists in a specified publishing point path.
Syntax
IWMSFileDescriptions = IWMSPublishingPoint.get_FileDescriptions( string strRelativePath );
Parameters
strRelativePath
[in] string containing a subdirectory or file in the base path. You can use the IWMSPublishingPoint.Path property to specify the base path.
Property Value
An IWMSFileDescriptions object. This is null if the publishing point path does not contain a directory, media file, or playlist file. You can use the IWMSPublishingPoint.Path property to retrieve the publishing point path.
If this property fails, it throws an exception.
Number | Description |
0x00000002 | The file indicated by strRelativePath was not found. |
0x00000003 | The path indicated by strRelativePath was not found. |
0xC00D1580L | The data source plug-in that the server is attempting to use to access the path referenced by strRelativePath does not support enumeration of files. |
0xC00D145AL | The publishing point was already removed. |
0xC00D157EL | The server was not able to find a data source plug-in to access the path referenced by strRelativePath. |
0xC00D1452L | The method is not supported for cache proxy publishing points. |
Remarks
This property is read-only. If the publishing point path contains either a media file or playlist file, the IWMSFileDescriptions object will contain information about only that file, and an error is returned if any value other than a zero-length string is specified in the first parameter.
This method is not supported for cache proxy publishing points.
This method requires the Network Service account to have read and browse access to the specified path.
Example Code
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Declare variables. WMSServer Server; IWMSPublishingPoints PubPoints; IWMSPublishingPoint PubPoint; IWMSFileDescriptions FileDescriptions; 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 IWMSFileDescriptions object // containing information about files available to the // publishing point. strText = ".\\"; FileDescriptions = PubPoint.get_FileDescriptions(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 |