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 table lists the value contained within an HRESULT.
| Return code | Description |
|---|---|
|
The method did not exist. |
|
One or more parameters was not valid. |
|
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.
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
Send comments about this topic to Microsoft
Build date: 11/19/2012