Muokkaa

Jaa


GetPropertyOrigin function

Determines the class in which a property is declared.

Note

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

Syntax

HRESULT GetPropertyOrigin (
   [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 property for the object whose owning class is being requested.

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

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_NOT_FOUND 0x80041002 The specified property was not found.
WBEM_E_INVALID_PARAMETER 0x80041008 A parameter is not valid.
WBEM_E_OUT_OF_MEMORY 0x80041006 Not enough memory is available to complete the operation.
WBEM_S_NO_ERROR 0 The function call was successful.

Remarks

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

Because a class can inherit properties from one or more base classes, developers often want to determine the property 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