IWMSPlugins::Clone

banner art

Previous Next

IWMSPlugins::Clone

The Clone method creates a duplicate instance of a specific IWMSPlugin interface.

Syntax

  HRESULT Add(
  BSTR  bstrDestName,
  IWMSPlugin*  pSrcPlugin,
  IWMSPlugin**  pDestPlugin
);

Parameters

bstrDestName

[in] BSTR containing the name of the plug-in to create.

pSrcPlugin

[in] Pointer to a specific IWMSPlugin interface to clone.

pDestPlugin

[out] Pointer to a pointer to the duplicate IWMSPlugin interface. This method calls AddRef internally. To avoid memory leaks, you must call Release when you are finished using the interface.

Return Values

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

Return code Number Description
NS_E_DUPLICATE_NAME 0xC00D0036L bstrDestName is already being used by another plug-in in the current plug-in collection.
NS_E_NAMESPACE_BAD_NAME 0xC00D1396L bstrDestName contains an invalid character. Invalid characters are: & " ' < > \
NS_E_NAMESPACE_EMPTY_NAME 0xC00D1394L bstrDestName is a zero-length string.
NS_E_NAMESPACE_NAME_TOO_LONG 0xC00D1392L bstrDestName is longer than the maximum allowed length.

Remarks

All property values are copied to the new plug-in except the Enabled property, which is set to VARIANT_FALSE.

The WMS_PLUGIN_REMOVE_ON_SERVICE_RESTART flag for the duplicate plug-in is set to FALSE. The value for this flag is accessible from the IWMSPlugin::Status method.

Example Code

  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

Previous Next