GetPropertyHandle method

IWbemObjectAccess::GetPropertyHandle method

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

wszPropertyName [in]

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

pType [out]

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

plHandle [out]

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 table lists the value contained within an HRESULT.

Return codeDescription
WBEM_S_NO_ERROR

The call succeeded.

WBEM_E_INVALID_PARAMETER

A specified parameter is not valid.

WBEM_E_NOT_FOUND

The property name specified does not exist.

WBEM_E_NOT_SUPPORTED

The request properties are type : CIM_OBJECT or CIM_ARRAY.

 

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Wbemcli.h (include Wbemidl.h)

Library

Wbemuuid.lib

DLL

Esscli.dll;
Fastprox.dll;
Wbemess.dll

See also

IWbemObjectAccess

 

 

Show:
© 2016 Microsoft