Clone function

Returns a new object that is a complete clone of the current object.

Note

This API is for internal use only. It's not intended for use from developer code.

Syntax

HRESULT Clone (
   [in] int                  vFunc,
   [in] IWbemClassObject*    ptr,
   [out] IWbemClassObject**  ppCopy
);

Parameters

vFunc
[in] This parameter is unused.

ptr
[in] A pointer to an IWbemClassObject instance.

ppCopy
[out] A new object that is a complete lone of ptr. This argument cannot be null if it receives the copy of the current object.

Return value

The following values returned by this function are defined in the WbemCli.h header file, or you can define them as constants in your code:

Constant Value Description
WBEM_E_FAILED 0x80041001 There has been a general failure.
WBEM_E_INVALID_PARAMETER 0x80041008 null was specified as a parameter, and it is not legal in this usage.
WBEM_E_OUT_OF_MEMORY 0x80041006 Not enough memory is available to clone the object.
WBEM_S_NO_ERROR 0 The function call was successful.

Remarks

This function wraps a call to the IWbemClassObject::Clone method.

The cloned object is a COM object that has a reference count of 1.

Requirements

Platforms: See System Requirements.

Header: WMINet_Utils.idl

.NET Framework Versions: Available since 4.7.2

See also