DWbemClassObject.CompareTo

[This is preliminary documentation and subject to change.]

The DWbemClassObject.CompareTo method compares an object to another CIMOM object. This comparison is subject to certain constraints.

DWbemClassObject.CompareTo(
  [in]  lFlags As Long, 
  [in]  pCompareTo As Object
) As Long
 

Parameters

lFlags
Specifies the object characteristics to consider in comparison to other objects. You can use WBEM_COMPARISON_INCLUDE_ALL to consider all features, or any combination of these flags:
WBEM_FLAG_IGNORE_OBJECT_SOURCE
Ignores, in comparison to other objects, the source of the objects, namely the server and the namespace from which they came.
WBEM_FLAG_IGNORE_QUALIFIERS
During comparison, ignores all qualifiers (including "key" and "dynamic").
WBEM_FLAG_IGNORE_DEFAULT_VALUES
Ignores the default values of properties. This flag is meaningful only when comparing classes.
WBEM_FLAG_IGNORE_FLAVOR
Ignores qualifier flavors. This flag still takes qualifier values into account. However, it 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.

Note  Property and qualifier names are always compared in a case-insensitive manner.

WBEM_FLAG_IGNORE_CLASS
Instructs the system to assume that the objects being compared are instances of the same class. Consequently, it compares instance-related information only. To optimize performance, you should use this flag. If the objects are not of the same class, the results are unpredictable, and most probably the results are worthless.
pCompareTo
Object of class DWbemClassObject. This is the object in comparison. The object must be a valid DWbemClassObject instance, and it cannot be NOTHING.

Return Values

WBEM_E_FAILED Unspecified error.
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 available 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