Compares two IPXC_CState objects. Objects that belong to different documents are never equal.
HRESULT Compare([in] IPXC_CState* pState, [out, retval] LONG* pResult);
- [in] The IPXC_CState object to compare.
- [out, retval] Pointer to LONG variant that will get result of comparison. If objects are equal it will be 0 (zero). Otherwise, it will be -1 or 1. The result is useful for ordering IPXC_CState objects.
Returns S_OK if operation was successful or error code in other cases.
Except ordering, not other significance should be attached to the result. In particular, a non zero result indicates nothing about values of object's properties. The result is valid withing a single instance of document where objects were taken. If Compare returns non zero value and the document is closed and reopened, there is no guarantee that it will be return the same non zero value for those same CState object.
The following conditions apply:
- If a.Compare(b) == 0, then b.Compare(a) == 0.
- If a.Compare(b) > 0, then b.Compare(a) < 0.
- If a.Compare(b) < 0, then b.Compare(a) > 0.
- If a.Compare(b) == 0, and b.Compare(c) == 0, then a.Compare(c) == 0.
- If a.Compare(b) > 0, and b.Compare(c) > 0, then a.Compare(c) > 0.
- If a.Compare(b) < 0, and b.Compare(c) < 0, then a.Compare(c) < 0.
See also IPXC_CState.