PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

HigherDriverVersion

HigherDriverVersion compares two driver version numbers, normally the values in their DriverDescription structures. It returns a value that indicates which driver is the latest version. This service may be used by any software that loads or evaluates drivers.

short HigherDriverVersion (
                     NumVersion *driverVersion1,
                     NumVersion *driverVersion2);
struct NumVersion {
    UInt8 majorRev;                 /* 1st part of version number */
                                    /* in BCD */
    UInt8 minorAndBugRev;           /* 2nd and 3rd part of version
                                    /* number share a byte */
    UInt8 stage;                    /* stage code: dev, alpha, */
                                    /* beta, final */
    UInt8 nonRelRev;                /* rev level of nonreleased */
                                    /* version */
};
driverVersion1
First version number being compared.
driverVersion2
Second version number being compared.
DESCRIPTION

HigherDriverVersion returns 0 if driverVersion1 and driverVersion2 are equal. It returns a negative number if driverVersion1 < driverVersion2 and a positive number greater than 0 if driverVersion1 > driverVersion2. If both drivers have stage values of final, a nonRelRev value of 0 is evaluated as greater than any nonzero number.

Stage codes are the following:

developStage        = 0x20
alphaStage          = 0x40
betaStage           = 0x60
finalStage          = 0x80

© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)