IWMSFileDescription Object (Visual Basic .NET)
.gif)
| Previous | Next |
IWMSFileDescription Object (Visual Basic .NET)
You can use the IWMSFileDescription object to describe a directory, content file, or playlist file.
The IWMSFileDescription object exposes the following properties.
| Property | Description |
| Name | Retrieves the name of a directory, media file, or playlist file. |
| Type | Retrieves an enumeration value that indicates whether the IWMSFileDescription object describes a directory, a media file, or a playlist file. |
Example Code
The following example illustrates how to retrieve an IWMSFileDescription object.
Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices
Private Sub RetrieveObj()
' Declare variables.
Dim Server As WMSServer
Dim FileDescriptions As IWMSFileDescriptions
Dim FileDescription As IWMSFileDescription
Dim strPath As String
Dim i As Integer
Try
' Create the WMSServer object.
Server = New WMSServer()
' Retrieve the IWMSFileDescriptions object.
strPath = "file://c:\wmpub\wmroot"
FileDescriptions = Server.FileDescriptions(strPath, WMS_FILE_TYPE.WMS_FILE_UNSPECIFIED)
' Retrieve information associated with each description.
For i = 0 To FileDescriptions.Count - 1
FileDescription = FileDescriptions.Item(i)
Next i
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
See Also
| Previous | Next |