IWMSServer::put_DefaultPluginLoadType

The put_DefaultPluginLoadType method specifies an enumeration value that indicates whether the server loads authentication, event notification, and authorization plug-ins as in-process or out-of-process objects.

HRESULT put_DefaultPluginLoadType(
  WMS_PLUGIN_LOAD_TYPE  val
);

Arguments

val

[in] Member of the WMS_PLUGIN_LOAD_TYPE enumeration that specifies whether a plug-in is loaded in or out of process. 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.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code

Number

Description

E_INVALIDARG

0x80070057

Indicates that val 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 is loaded out-of-process.

Example

#include <windows.h>
#include <atlbase.h>    // Includes CComBSTR.
#include "wmsserver.h"

// Declare variables and interfaces.
IWMSServer      *pServer;

HRESULT         hr;
VARIANT_BOOL    bVal;
CComBSTR        bstrText;

// Initialize the COM library and retrieve a pointer
// to an IWMSServer interface.
hr = CoInitialize(NULL);
hr = CoCreateInstance(CLSID_WMSServer,
                      NULL,
                      CLSCTX_ALL,
                      IID_IWMSServer,
                      (void **)&pServer);
if (FAILED(hr)) goto EXIT;

// Set the default load type for plug-ins.
hr = pServer->put_DefaultPluginLoadType(WMS_PLUGIN_LOAD_TYPE_IN_PROC);
if (FAILED(hr)) goto EXIT;

EXIT:
    // TODO: Release temporary COM objects and uninitialize COM.

Requirements

Header: wmsserver.h.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003 family, Windows Server 2008 family.

See Also

Reference

IWMSServer Interface