IWbemClassObject::Next method (wbemcli.h)
The IWbemClassObject::Next method retrieves the next property in an enumeration that started with IWbemClassObject::BeginEnumeration. This should be called repeatedly to enumerate all the properties until WBEM_S_NO_MORE_DATA returns. If the enumeration is to be terminated early, then IWbemClassObject::EndEnumeration should be called.
The order of the properties returned during the enumeration is not defined.
HRESULT Next( [in] long lFlags, [out] BSTR *strName, [out] VARIANT *pVal, [out, optional] CIMTYPE *pType, [out, optional] long *plFlavor );
Reserved. This parameter must be 0.
Receives a new BSTR that contains the property name. To prevent memory leaks in the client process, the caller must call SysFreeString when the name is no longer required. You can set this parameter to NULL if the name is not required.
This VARIANT is filled with the value of the property. The method calls VariantInit on this VARIANT, so the caller should ensure that the VARIANT is not active prior to the call. The caller must use VariantClear when the value is no longer required.
You can set this parameter to NULL if the value is not required. If an error code is returned, the VARIANT pointed to by pVal is left unmodified.
[out, optional] pType
This parameter can be NULL. If it is not NULL, it must point to a CIMTYPE variable (a LONG) into which the type of the property is placed. It is possible that the value of this property can be a VT_NULL VARIANT, in which case it is necessary to determine the actual type of the property.
[out, optional] plFlavor
The property is a standard system property.
The property was inherited from the parent class.
The property, while inherited from the parent class, has not been modified at the instance level.
The property belongs to the derived-most class.
The property is modified at the instance level (that is, either a value was supplied or a qualifier was added/modified).
This method returns an HRESULT that indicates the status of the method call. The following list lists the value contained within an HRESULT. For general HRESULT values, see System Error Codes.
If the underlying type of the property is an object path, date or time, or another special type, then the returned type does not contain enough information. The caller must examine the CIMTYPE for the specified property, and determine if the property is an object reference, date or time, or another special type.
This method also returns system properties.
|Minimum supported client||Windows Vista|
|Minimum supported server||Windows Server 2008|
|Header||wbemcli.h (include Wbemidl.h)|
|DLL||CIMWin32.dll; Esscli.dll; Fastprox.dll; FrameDyn.dll; FrameDynOS.dll; Krnlprov.dll; Ncprov.dll; Wbemcore.dll; Wbemess.dll; Wmipiprt.dll|