IWbemObjectAccess::GetPropertyHandle method (wbemcli.h)

The GetPropertyHandle method returns a unique handle that identifies a property. You can use this handle to identify properties when using IWbemObjectAccess methods to read or write property values.

Syntax

HRESULT GetPropertyHandle(
  [in]  LPCWSTR wszPropertyName,
  [out] CIMTYPE *pType,
  [out] long    *plHandle
);

Parameters

[in] wszPropertyName

Constant, null-terminated string of 16-bit Unicode characters that contains the property name.

[out] pType

Pointer to a CIMTYPE used to return the CIM type of the property.

[out] plHandle

Pointer to an integer used to return the property handle.

Return value

This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an HRESULT.

Remarks

Handles can be retrieved for all data types other than CIM_OBJECT and CIM_ARRAY. Returned handles work across all instances of a class.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wbemcli.h (include Wbemidl.h)
Library Wbemuuid.lib
DLL Esscli.dll; Fastprox.dll; Wbemess.dll

See also

IWbemObjectAccess