IWMSFileDescriptions.Delete (C#)
Previous | Next |
IWMSFileDescriptions.Delete (C#)
The Delete method removes an IWMSFileDescription object from the IWMSFileDescriptions collection.
Syntax
IWMSFileDescriptions .Delete( object objIndex );
Parameters
objIndex
[in] object containing the IWMSFileDescription object to be removed.
Return Values
This method does not return a value.
If this method fails, it throws an exception.
Number | Description |
0x8002000B | objIndex is an invalid index location. |
Example Code
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); // Delete the first file description from the collection. FileDescriptions.Delete(0); } catch (COMException comExc) { // TODO: Handle COM exceptions. } catch (Exception e) { // TODO: Handle exceptions. }
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 |