IWbemQualifierSet::Next

[This is preliminary documentation and subject to change.]

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

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

HRESULT IWbemQualifierSet::Next(
  [in] LONG lFlags,
  [out, OPTIONAL] BSTR *pbstrName,
  [out, OPTIONAL] VARIANT *pVal,
  [out, OPTIONAL] LONG *plFlavor
);
 

Parameters

lFlags
Reserved. It must be zero.
pbstrName
A new BSTR is always allocated whenever WBEM_NO_ERROR is returned.

The caller must call SysFreeString on the returned string when it is no longer required.

Note  If pbstrName points to a valid BSTR on entry, the valid BSTR  is not freed, and there will be a memory leak.

pVal
This parameter receives the value for the qualifier. VariantInit is called on this 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.
plFlavor
If not NULL, the value pointed to is set to the qualifier flavor. See Qualifier Flavors.

Return Values

WBEM_E_INVALID_PARAMETER An invalid parameter was specified, or the namespace could not be parsed.
WBEM_E_UNEXPECTED Caller did not call IWbemQualifierSet::BeginEnumeration.
WBEM_NO_ERROR Success.
WBEM_S_NO_MORE_DATA No more properties are left in the enumeration.

See Also

IWbemQualifierSet::BeginEnumeration, IWbemQualifierSet::EndEnumeration, Qualifier Flavors