IWMSServer.DefaultPluginLoadType (C#)
Previous | Next |
IWMSServer.DefaultPluginLoadType (C#)
The DefaultPluginLoadType property specifies and retrieves an enumeration value that indicates whether the server loads authentication, event notification, and authorization plug-ins as in-process or out-of-process objects.
Syntax
IWMSServer .DefaultPluginLoadType = WMS_PLUGIN_LOAD_TYPE; WMS_PLUGIN_LOAD_TYPE = IWMSServer.DefaultPluginLoadType;
Property Value
A member of a WMS_PLUGIN_LOAD_TYPE enumeration type. This must be one of the following values.
Value | Description |
WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED | The server determines whether to load the plug-in as an in-process or out-of-process object. |
WMS_PLUGIN_LOAD_TYPE_IN_PROC | The plug-in is loaded as an in-process object. |
WMS_PLUGIN_LOAD_TYPE_OUT_OF_PROC | The plug-in is loaded as an out-of-process object. |
If this property fails, it throws an exception.
Number | Description |
0x80070057 | WMS_PLUGIN_LOAD_TYPE is an invalid argument. |
Remarks
If this property is set to WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED, the server loads plug-ins as in-process objects. However, if the UnsupportedLoadType property of a plug-in specifies that it cannot be loaded in-process, the plug-in will be loaded out-of-process.
Example Code
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Retrieve the default plug-in load type. WMS_PLUGIN_LOAD_TYPE pltType; pltType = Server.DefaultPluginLoadType; if(pltType == WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED) { // TODO: Handle unspecified load type. } else if(pltType == WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_IN_PROC) { // TODO: Handle in-process load type. } else if(pltType == WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_OUT_OF_PROC) { // TODO: Handle out-of-process load type. } // Set the default load type for plug-ins. Server.DefaultPluginLoadType = WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_IN_PROC; } 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 |