Export (0) Print
Expand All

IWbemQualifierSet::Next method

The IWbemQualifierSet::Next method retrieves the next qualifier in an enumeration that started with IWbemQualifierSet::BeginEnumeration. This method is called repeatedly to enumerate all the qualifiers until WBEM_S_NO_MORE_DATA returns. To terminate the enumeration early, call IWbemQualifierSet::EndEnumeration.

The order of the qualifiers returned during the enumeration is not defined.

Syntax


HRESULT Next(
  [in]   LONG lFlags,
  [out]  BSTR *pstrName,
  [out]  VARIANT *pVal,
  [out]  LONG *plFlavor
);

Parameters

lFlags [in]

Reserved. This parameter must be 0 (zero).

pstrName [out]

This parameter receives the name of the qualifier. A new BSTR is always allocated whenever WBEM_S_NO_ERROR returns.

If pstrName is NULL, it is ignored; otherwise, the caller must ensure that this parameter does not point to a valid BSTR on entry, or else there will be a memory leak. Also, the caller must remember to call SysFreeString on the returned string when it is no longer required.

pVal [out]

This parameter receives the value for the qualifier. VariantInit is called on the VARIANT by this method. The caller must call VariantClear on this pointer when the value is no longer required. If an error code is returned, the VARIANT pointed to by pVal is left unmodified. This parameter is ignored if set to NULL.

plFlavor [out]

If not NULL, the value pointed to is set to the qualifier flavor. 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_OUT_OF_MEMORY

There was not enough memory to complete the operation.

WBEM_E_UNEXPECTED

Caller did not call IWbemQualifierSet::BeginEnumeration.

WBEM_S_NO_ERROR

The call succeeded.

WBEM_S_NO_MORE_DATA

No more qualifiers are left in the enumeration.

 

Requirements

Minimum supported client

Windows Vista

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
IWbemQualifierSet::BeginEnumeration
IWbemQualifierSet::EndEnumeration

 

 

Show:
© 2014 Microsoft