Muokkaa

Jaa


GetMethodOrigin function

Determines the class in which a method is declared.

Note

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

Syntax

HRESULT GetMethodOrigin (
   [in] int                 vFunc,
   [in] IWbemClassObject*   ptr,
   [in] LPCWSTR             wszMethodName,
   [out] BSTR*              pstrClassName
);

Parameters

vFunc
[in] This parameter is unused.

ptr
[in] A pointer to an IWbemClassObject instance.

wszMethodName
[in] The name of the method for the object whose owning class is being requested.

pstrClassName
[out] Receives the name of the class that owns the method.

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 was not found.
WBEM_E_INVALID_PARAMETER 0x80041008 One or more parameters are not valid.
WBEM_S_NO_ERROR 0 The function call was successful.

Remarks

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

Because a class can inherit methods from one or more base classes, developers often want to determine the class in which a given method is defined.

The pstrClassName parameter must not point to a valid BSTR before the function is called because this is an out parameter; this pointer is not deallocated after the function returns.

Requirements

Platforms: See System Requirements.

Header: WMINet_Utils.idl

.NET Framework Versions: Available since 4.7.2

See also