IWbemClassObject::CompareTo method (wbemcli.h)

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

Syntax

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

Parameters

[in] lFlags

Specifies the object characteristics to consider in comparison to another object. It can be WBEM_COMPARISON_INCLUDE_ALL to consider all features, or any combination of these flags.

WBEM_FLAG_IGNORE_OBJECT_SOURCE

Ignore the source of the objects, namely the server and the namespace they came from, in comparison to other objects.

WBEM_FLAG_IGNORE_QUALIFIERS

Ignore all qualifiers (including Key and Dynamic) in comparison.

WBEM_FLAG_IGNORE_DEFAULT_VALUES

Ignore default values of properties. 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 (for more information, see Qualifier Flavors).

WBEM_FLAG_IGNORE_CASE

Compare string values 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 whether this flag is specified or not.

WBEM_FLAG_IGNORE_CLASS

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 undefined.

[in] pCompareTo

Object in comparison. This pointer must point to a valid IWbemClassObject instance. It cannot be NULL.

Return value

This method returns an HRESULT indicating the status of the method call. The following list lists the value contained within an HRESULT. For general HRESULT values, see System Error Codes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header wbemcli.h (include Wbemidl.h)
Library WbemUuid.lib
DLL CIMWin32.dll; Esscli.dll; Fastprox.dll; FrameDyn.dll; FrameDynOS.dll; Krnlprov.dll; Ncprov.dll; Wbemcore.dll; Wbemess.dll; Wmipiprt.dll

See also

IWbemClassObject

Qualifier Flavors

WBEM_COMPARISON_FLAG