DeleteMethod function

Deletes the specified method from a CIM class definition.

Note

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

Syntax

HRESULT Delete (
   [in] int               vFunc,
   [in] IWbemClassObject* ptr,
   [in] LPCWSTR           wszName
);

Parameters

vFunc
[in] This parameter is unused.

ptr
[in] A pointer to an IWbemClassObject instance.

wszName
[in] The name of the method to remove from the class table. wszName must be a pointer to a valid LPCWSTR.

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_NOT_FOUND 0x80041002 The specified method does not exist.
WBEM_E_OUT_OF_MEMORY 0x80041006 There is not enough memory to complete the operation.
WBEM_S_NO_ERROR 0 The function call was successful.

Remarks

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

Method deletion is not supported for IWbemClassObject pointers that point to CIM instances.

Requirements

Platforms: See System Requirements.

Header: WMINet_Utils.idl

.NET Framework Versions: Available since 4.7.2

See also