IWMSPlugin.LoadType (C#)
The LoadType 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.
Plugin.LoadType = WMS_PLUGIN_LOAD_TYPE;
WMS_PLUGIN_LOAD_TYPE = Plugin.LoadType;
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 |
---|---|
0xC00D1453L |
The load type is not supported by the plug-in. |
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
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugins Plugins;
IWMSPlugin Plugin;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSPlugins object.
Plugins = Server.Authenticators;
// Retrieve information about each plug-in.
for (int i = 0; i < Plugins.Count; i++)
{
Plugin = Plugins[i];
// Retrieve the plug-in load type.
WMS_PLUGIN_LOAD_TYPE ltLoadType;
ltLoadType = Plugin.LoadType;
if (ltLoadType != WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED)
{
Plugin.LoadType = WMS_PLUGIN_LOAD_TYPE.WMS_PLUGIN_LOAD_TYPE_UNSPECIFIED;
}
}
}
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.