CompareVersion Method (IPIVersion interface)

                    

Compares the version of two objects.

 

Syntax

object.CompareVersion pObject

The CompareVersion method syntax has these parts:

Part

Description

object

An object expression that evaluates to a IPIVersion object.

pObject

An object expression that evaluates to a IPIVersion object.

 

Remarks

This method returns the comparison result in a Long Integer. The result is interpreted as follows:

Result

Interpretation

Greater than 0

Object is older than passed object.

Less than 0

Object is newer than passed object.

equal to 0

Two objects are the same version.

 

The IPIVersion interface may be supported by any PI-SDK object. Currently, only PIModule supports this interface.

  

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseNOIPIVERSION

pObject doesn't support IPIVersion.

Enabling Operational Intelligence