IWbemClassObject::GetMethodOrigin method

The IWbemClassObject::GetMethodOrigin method is used to determine the class for which a method was declared.

This call is only supported if the current object is a CIM class definition. Method manipulation is not available from IWbemClassObject pointers which point to CIM instances.

Syntax


HRESULT GetMethodOrigin(
  [in]  LPCWSTR wszMethodName,
  [out] BSTR    *pstrClassName
);

Parameters

wszMethodName [in]

Name of the method for the object whose owning class is being requested.

pstrClassName [out]

Receives the name of the class which owns the method. The user must call SysFreeString on the returned BSTR when it is no longer required.

Return value

This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an HRESULT. For general HRESULT values, see System Error Codes.

WBEM_E_NOT_FOUND

The method did not exist.

WBEM_E_INVALID_PARAMETER

One or more parameters was not valid.

WBEM_S_NO_ERROR

The call succeeded.

Remarks

Because methods are inherited from class to class, it is often desirable to determine the owning class for a given method.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

WbemCli.h (include Wbemidl.h)

IDL

WbemCli.idl

Library

WbemUuid.lib

DLL

CIMWin32.dll;
Esscli.dll;
Fastprox.dll;
FrameDyn.dll;
FrameDynOS.dll;
Krnlprov.dll;
Ncprov.dll;
Wbemcore.dll;
Wbemess.dll;
Wmipiprt.dll

CLSID

CLSID_WbemClassObject is defined as 9A653086-174F-11d2-B5F9-00104B703EFD

IID

IID_IWbemClassObject is defined as dc12a681-737f-11cf-884d-00aa004b2e24

 

 

Show: