126.96.36.199.3.1 Version Number Comparison
On the wire, version numbers are passed as three WORD values, as specified in [MS-DTYP]. In the EcDoConnectEx method, as specified in section 188.8.131.52, the rgwClientVersion, rgwServerVersion, and rgwBestVersion parameters are each passed as three WORD values.
Version numbers are now expressed in the format "XX.XX.XXXX.XXX". For example, "08.01.0215.000" represents a specific server build. The first number is the product major version. The second number is the product minor version. The third number is the build major number. The fourth number is the build minor number.
In order to make version comparisons, a three-WORD value version number (as transmitted over the wire) is converted into a four-WORD value version number. A scheme, referred to a version number normalization, was devised that converts from the three-WORD on-the-wire format of the version into a four-number version.
All received version parameters are converted into four-number versions before any version checks are performed. A function that converts the three-WORD value wire version format into a four-number (four-WORD) format that can then be used for version comparisons is described in the following pseudocode example.
// This routine converts a three-WORD version value into a normalized // four-WORD version value. // // Version is an array of 3 WORD values on the wire. // NormalizedVersion is an array of 4 WORD values for comparison. // IF high-bit of Versionis set THEN SET NormalizedVersion to high-byte of Version SET NormalizedVersion to low-byte of Version SET NormalizedVersion to Version with high-bit cleared SET NormalizedVersion to Version ELSE SET NormalizedVersion to Version SET NormalizedVersion to 0 SET NormalizedVersion to Version SET NormalizedVersion to Version ENDIF
The first WORD of the three-WORD version number is divided into two BYTE values, as specified in [MS-DTYP], one being the product major version and the other being the product minor version. On the wire, the client and server MUST determine whether the version that is being passed is in the old scheme or the new scheme. If the highest bit of the second WORD value on the wire is set, the version on the wire is in the new scheme. Otherwise, it is interpreted as the old scheme where the product minor version is not sent.