IWMSFileDescription.Name (Visual Basic .NET)
Previous | Next |
IWMSFileDescription.Name (Visual Basic .NET)
The Name property retrieves the name of a directory, media file, or playlist file.
Syntax
String = IWMSFileDescription.Name
Property Value
A String containing the name.
If this property fails, it returns an error number.
Number | Description |
0x8007000E | There is insufficient memory to complete the function. |
Remarks
This property is read-only.
Example Code
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub GetName() ' Declare variables. Dim Server As WMSServer Dim FileDescriptions As IWMSFileDescriptions Dim FileDescription As IWMSFileDescription Dim strPath As String Dim strName As String 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 Each FileDescription In FileDescriptions ' Retrieve the name of the file. strName = FileDescription.Name Next 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
Previous | Next |