IWMSFileDescriptions Object (C#)
The IWMSFileDescriptions object contains a collection of IWMSFileDescription objects.
The IWMSFileDescriptions object exposes the following properties and methods.
Property |
Description |
---|---|
Count |
Retrieves the number of IWMSFileDescription objects contained in the IWMSFileDescriptions collection. |
length |
Retrieves the number of IWMSFileDescription objects contained in the IWMSFileDescriptions collection. This method is provided for JScript compatibility. |
Method |
Description |
---|---|
CreateDataSourceDirectory |
Creates a new directory that can be used to store content. |
Delete |
Removes an IWMSFileDescription object from the IWMSFileDescriptions collection. |
In C#, there are two ways to access objects in a collection:
Access individual objects directly by using a string (where applicable)
Iterate through the objects by using an index
You must use array notation when retrieving objects from a collection, except when using the get_Item method.
Example
The following example illustrates how to retrieve an IWMSFileDescriptions object.
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSFileDescriptions FileDescriptions;
string strPath;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSFileDescriptions object.
strPath = "file://c:\\wmpub\\wmroot";
FileDescriptions = Server.get_FileDescriptions(strPath,
WMS_FILE_TYPE.WMS_FILE_UNSPECIFIED);
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}