SWbemObject.CompareTo_ method
The CompareTo_ method of the SWbemObject object compares two SWbemObject objects. This comparison is subject to certain constraints based on the values specified in the iFlags parameter.
For an explanation of this syntax, see Document Conventions for the Scripting API.
Syntax
bAreEqual = .CompareTo_( _ ByVal objwbemObject, _ [ ByVal iFlags ] _ )
Parameters
- objwbemObject [in]
-
Required. This parameter is an SWbemObject object. This is the object with which the first object is compared. The object must be a valid SWbemObject instance.
- iFlags [in, optional]
-
Specifies the object characteristics to consider when comparing an object with other objects. You can use wbemComparisonFlagIncludeAll to consider all features (this is the default), or any combination of the following values.
Return value
This method returns the Boolean value of TRUE if the objects match. It returns FALSE if the objects do not match.
Error codes
After the completion of the CompareTo_ method, the Err object may contain one of the error codes in the following table.
| Error (Name/Dec/Hex) | Meaning |
|---|---|
|
Unspecified error. |
|
A specified parameter is not valid. |
|
Not enough memory to complete the operation. |
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Type library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/19/2012