Export (0) Print
Expand All

IWbemQualifierSet::Get method

The IWbemQualifierSet::Get method gets the specified named qualifier, if found.

Syntax


HRESULT Get(
  [in]   LPCWSTR wszName,
  [in]   LONG lFlags,
  [out]  VARIANT *pVal,
  [out]  LONG *plFlavor
);

Parameters

wszName [in]

Name of the qualifier for which the value is being requested. The pointer is treated as read-only.

lFlags [in]

Reserved. This parameter must be 0.

pVal [out]

When successful, VARIANT is assigned to the correct type and value for the qualifier. VariantInit is called on this VARIANT.

It is the responsibility of the caller to call VariantClear on the pointer when the value is no longer required. If there is an error code, the VARIANT pointed to by pVal is not modified.

If this parameter is NULL, the parameter is ignored.

plFlavor [out]

Can be NULL. If not NULL, this must point to a LONG that receives the qualifier flavor bits for the requested qualifier. For more information, see Qualifier Flavors.

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_E_INVALID_PARAMETER

A specified parameter is not valid.

WBEM_E_NOT_FOUND

The specified qualifier did not exist.

WBEM_S_NO_ERROR

The call succeeded.

 

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 XP

Minimum supported server

Windows Server 2003

Header

Wbemcli.h (include Wbemidl.h)

Library

Wbemuuid.lib

DLL

Fastprox.dll;
Krnlprov.dll;
Ncprov.dll;
Wbemcore.dll

See also

Qualifier Flavors

 

 

Show:
© 2014 Microsoft