I have been using for ages this construct in my versioninfo:

FILEVERSION 0, 2, 1, 121201

which means Version 2.1.121201
(version 2, subversion 1, build 12.12.01)

Look fine under Win9x, but since Win2K windows calculates some other, wired numbers out of my versioninfo.
It seems to be something like a hex-to-dec or Lowword+Highword calculation ...

Whats wrong with my notation?
Posted on 2002-01-11 09:14:11 by beaster
i have seen in the past that alot of people have had probelms getting the version info from win2k. i noticed an api call GetVersionEx along with the OSVERSIONINFO struct it uses. maybe this call was designed more for win2k that what you are using. just a thought.
Posted on 2002-01-11 11:10:49 by smurf
thanks, but I forgot to mention, that I dont want to read the version, I just look at it on the desktop showing "properties".

Attached the win95 (top) and win2k (bottom) display (german windows) where you can see the two different version outputs.
Posted on 2002-01-11 12:13:58 by beaster
When defining versioninfo, ALWAYS define all four parts - you do
this, which is good. Otherwise very very weird errors pop up. Next
thing, the versioninfo is four 16bit words, not 32bit dwords.
121201 definitely can't fit in a 16bit variable :).
Posted on 2002-01-11 13:40:47 by f0dder
Here's what PlatformSDK has to say:


Specifies the binary version number for the file. The version consists of two 32-bit integers, defined by four 16-bit integers. For example, "FILEVERSION 3,10,0,61" is translated into two doublewords: 0x0003000a and 0x0000003d, in that order. Therefore, if version is defined by the DWORD values dw1 and dw2, they need to appear in the FILEVERSION statement as follows: HIWORD(dw1), LOWORD(dw1), HIWORD(dw2), LOWORD(dw2).
Posted on 2002-01-11 13:42:17 by f0dder
thanx, thats it!

now I can squeeze my brain, how to get the date into a 16 bit value ...
Posted on 2002-01-14 03:57:15 by beaster
Better to use the fileversion as, well, fileversion, and not some hybrid
fileversion/date :). You can have current time/date inserted into
your executables at assemble-time, I think masm has a CurDate
macro or something similar.
Posted on 2002-01-14 04:06:38 by f0dder