Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSServer.get_FileType (C#)
The FileType property retrieves the type of a content file identified by a specific path.
Syntax
WMS_FILE_TYPE
=
Server
.get_FileType(
string
path
);
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 throws an exception.
| 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
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Retrieve the file type for the specified file.
strText = "c:\\wmpub\\wmroot\\welcome1.asf";
WMS_FILE_TYPE ftType;
ftType = Server.get_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 |