IWbemClassObject::CompareTo

[This is preliminary documentation and subject to change.]

The IWbemClassObject::CompareTo method compares an object to another CIMOM object. Note that there are certain constraints in this comparison process.

HRESULT IWbemClassObject::CompareTo(
  [in] Long lFlags, 
  [in] IWbemClassObject *pCompareTo
);
 

Parameters

lFlags
Specifies the object characteristics to consider in comparison to other object. It can be WBEM_COMPARISON_INCLUDE_ALL to consider all features, or any combination of these flags:
WBEM_FLAG_IGNORE_OBJECT_SOURCE
The source of the objects, namely the server and the namespace they came from, are ignored in comparison to other objects.
WBEM_FLAG_IGNORE_QUALIFIERS
All qualifiers (including "key" and "dynamic") should be ignored in comparison.
WBEM_FLAG_IGNORE_DEFAULT_VALUES
Default values of properties should be ignored. This flag is only meaningful when comparing classes.
WBEM_FLAG_IGNORE_FLAVOR
Ignore qualifier flavors. This flag still takes qualifier values into account, but ignores flavor distinctions such as propagation rules and override restrictions (see Qualifier Flavors).
WBEM_FLAG_IGNORE_CASE
Compares strings in a case-insensitive manner. This applies both to strings and to qualifier values. Property and qualifier names are always compared in a case-insensitive manner.
WBEM_FLAG_IGNORE_CLASS
This flag instructs the system to assume that the objects being compared are instances of the same class. Consequently, this flag compares instance-related information only. Use this flag to optimize performance. If the objects are not of the same class, the results are unpredictable, and probably are worthless.
pCompareTo
The object in comparison. This pointer must point to a valid IWbemClassObject instance. It cannot be NULL.

Return Values

WBEM_E_FAILED Unspecified failures.
WBEM_E_INVALID_PARAMETER An invalid parameter was specified, or the namespace could not be parsed.
WBEM_E_OUT_OF_MEMORY There was not enough memory to complete the operation.
WBEM_S_DIFFERENT The objects are different.
WBEM_S_SAME The objects are the same, subject to comparison flags.

See Also

Qualifier Flavors