IWMSServer.FileDescriptions (Visual Basic .NET)
The FileDescriptions property retrieves an IWMSFileDescriptionsIWMSFileDescriptions Object (Visual Basic .NET) containing a collection of IWMSFileDescription objects that describe content files, playlist files, and directories.
IWMSFileDescriptions = IWMSServer.FileDescriptions(
Path As String Type As WMS_FILE_TYPE
)
Property Value
An IWMSFileDescriptions object.
If this property fails, it returns an error number.
Number |
Description |
---|---|
0x00000002 |
The data source plug-in was not able to find the indicated file. This error is returned by the WMS File Data Source plug-in, but other plug-ins could return different error codes. |
0x00000003 |
The path indicated by Path was not found. |
0xC00D1580L |
The data source plug-in that the server is attempting to use to access the path referenced by Path does not support the enumeration of files. |
0xC00D157EL |
The server was not able to find an enabled data source plug-in to access the indicated file. |
Arguments
strPath |
[in] String containing the file path name. |
Type |
[in] Member of the WMS_FILE_TYPE enumeration type. This must be one of the following values. |
Value |
Description |
---|---|
WMS_FILE_DIRECTORY |
The item is a directory. |
WMS_FILE_MEDIA |
The item is a digital media file. |
WMS_FILE_PLAYLIST |
The item is a playlist. |
WMS_FILE_STREAM_FORMAT |
The item is a stream format file. |
WMS_FILE_UNSPECIFIED |
The file type is either unknown or unspecified. |
Remarks
This property is read-only. You can only retrieve an IWMSFileDescriptions object for files that have registered media parsers or playlist parsers. The first parameter must start with an appropriate prefix to identify the type of storage system. For an NTFS or FAT file system, use the file:// prefix. For example, specifies the root directory of a server running on an NTFS or FAT file system and retrieves a collection of file://C:\asfrootIWMSFileDescription objects for the files and folders in that directory.
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
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub GetFileDescriptions()
' Declare variables.
Dim Server As WMSServer
Dim FileDescriptions As IWMSFileDescriptions
Dim strText As String
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve a list of file descriptions for
' the specified path.
strText = "c:\"
FileDescriptions = Server.FileDescriptions(strText, WMS_FILE_TYPE.WMS_FILE_MEDIA)
Catch excCom As COMException
' TODO: Handle COM exceptions.
Catch exc As Exception
' TODO: Handle errors.
Finally
' TODO: Clean-up code goes here.
End Try
End Sub
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
Reference
IWMSFileDescription Object (Visual Basic .NET)