IWMSServer.FileType (Visual Basic .NET)
Previous | Next |
IWMSServer.FileType (Visual Basic .NET)
The FileType property retrieves the type of a content file identified by a specific path.
Syntax
WMS_FILE_TYPE = Server .FileType( path As String )
Parameters
path
[in] String containing the path.
Property Value
A member of a 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. |
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.
This method requires the Network Service account to have read and browse access to the specified path.
Example Code
Imports Microsoft.WindowsMediaServices.Interop Imports System.Runtime.InteropServices Private Sub GetFileType() ' Declare variables. Dim Server As WMSServer Dim strText As String Dim ftType As WMS_FILE_TYPE Try ' Create the WMSServer object. Server = New WMSServer() ' Retrieve the file type for the specified file. strText = "c:\wmpub\wmroot\welcome1.asf" ftType = Server.FileType(strText)
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 |