Using the version Resource macro, i got an incorrect value when compiling the exe, and then right-clicking and selecting properties. The value Language, was all screwed up, however a simple change to the macro resolved the prob.

macro version label,fileos,filetype,filesubtype,lang,cp,
{ common
local data,size,vivalue,visize
label dd RVA data,size,0,0
data dw size,visize,0
vivalue dd 0FEEF04BDh,00010000h
local version,shift,char,filever,productver
filever = 0
productver = 0
if name eq 'FileVersion' | name eq 'ProductVersion'
virtual at 0
db value
count = $
end virtual
version = 0
shift = 16
repeat count
virtual at 0
db value
load char from %-1
end virtual
if char='.'
if shift mod 32 <> 0
shift = shift-16
shift = shift+32+16
end if
version = (version and not (0FFFFh shl shift)) or ((version shr shift and 0FFFFh)*10+char-'0') shl shift
end if
end repeat
if name eq 'FileVersion'
filever = version
else if name eq 'ProductVersion'
productver = version
end if
end if
dq filever,productver
dd 0,0,fileos,filetype+0,filesubtype+0,0,0
visize = $ - vivalue
local sfi_data,sfi_size
sfi_data dd sfi_size
du 1,'StringFileInfo',0
local str_data,str_size
str_data dd str_size
du 1,'040904E4',0
local vs_data,vs_size,value_data,value_size
align 4
vs_data dw vs_size,value_size/2
du 1,name,0
align 4
value_data du value,0
value_size = $ - value_data
vs_size = $ - vs_data
align 4
str_size = $ - str_data
sfi_size = $ - sfi_data
local vfi_data,vfi_size,var_data,var_size
vfi_data dd vfi_size
du 1,'VarFileInfo',0,0
var_data dw var_size,4
du 1,'Translation',0,0
dw lang,cp+0
var_size = $ - var_data
vfi_size = $ - vfi_data
size = $ - data }

the line in bold, needs to be changed to:
du 0,'Translation',0,0

Posted on 2003-03-30 23:38:06 by Joshua
and it apparently also needs to be aligned on a 4 byte boundery, so you need to add 'align 4' at the beginning
Posted on 2003-03-31 00:42:26 by Joshua
These macros are made in such way that everything is aligned to 4 at the end of each of them - so you don't need additional alignment at the beginning (and this also makes the size of resource data aligned for us).
Posted on 2003-03-31 03:50:24 by Tomasz Grysztar
i don't know, but if i added 2 resource icons (1 16*16, 1 32*32), the versioninfo section was off by 2 bytes (right-click->properties->version all had blank values), with 1 or 3 icons, it was ok. So i tried adding a align 4 to the top of the macro and now it is ok for 1,2 or 3 icons (and i assume for all numbers, but i haven't tested this)
Posted on 2003-03-31 09:21:46 by Joshua
So I forgot to put the alignment at the end of some macro (probably the "icon" one), I'll check it.
Posted on 2003-03-31 13:16:33 by Tomasz Grysztar