IWMSPlugins Object (C#)
Previous | Next |
IWMSPlugins Object (C#)
The IWMSPlugins object contains a collection of IWMSPlugin objects. The IWMSPlugins object exposes the following properties and methods.
Property | Description |
Category | Retrieves the category name for the IWMSPlugins collection. |
Count | Retrieves the number of IWMSPlugin objects contained in the IWMSPlugins collection. |
length | Retrieves the number of IWMSPlugin objects contained in the IWMSPlugins collection. This method is provided for JScript compatibility. |
Method | Description |
Clone | Creates a duplicate instance of a specific IWMSPlugin object. |
Refresh | Updates the list of IWMSPlugin objects in the IWMSPlugins collection to reflect the plug-ins that are registered for use by the server. |
Remove | Removes an IWMSPlugin object from the IWMSPlugins 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 Code
The following example illustrates how to retrieve an IWMSPlugins object.
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Declare variables. WMSServer Server; IWMSPlugins Plugins; try { // Create a new WMSServer object. Server = new WMSServerClass(); // Retrieve the IWMSPlugins object. Plugins = Server.EventHandlers; } catch (COMException comExc) { // TODO: Handle COM exceptions. } catch (Exception e) { // TODO: Handle exceptions. }
See Also
Previous | Next |