News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

VERSION INFO

Started by FlySky, December 03, 2012, 01:01:11 AM

Previous topic - Next topic

FlySky

Hey Guys,

I can't seem to get version info working for a dll.

It's a copy off the examples from MASM and based on hutch version of ttbar.

Compiling and linking with FILETYPE VFT_APP it works fine on a .exe
but somehow when compiling and linking like it is shown below the information is empty.

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1, 0, 0, 0
PRODUCTVERSION 1, 0, 0, 0
FILEOS 0
FILETYPE VFT_DLL
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904B0"
    BEGIN
      VALUE "CompanyName",      "The MASM32 SDK\000"
      VALUE "FileDescription",  "Text Toolbar Demo\000"
      VALUE "FileVersion",      "2.0\000"
      VALUE "InternalName",     "ttbar\000"
      VALUE "OriginalFilename", "ttbar.exe\000"
      VALUE "LegalCopyright",   "\251 1998-2011 The MASM32 SDK\000"
      VALUE "ProductName",      "ttbar\000"
      VALUE "ProductVersion",   "2.0\000"
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x409, 0x4B0
  END
END

Can anyone explain to me what I am missing here.

dedndave

it may be that you are missing the resource.h include file
it may also be that you use 0 for FILEOS   :P

older versions of the file were missing a few of the constants
this will work with old or new
you can add the other values inside the block, if you like
"\251" is the copyright symbol
;######################################################################

#include "\masm32\include\resource.h"

#ifndef  VS_VERSION_INFO
#define  VS_VERSION_INFO                     1
#endif

#ifndef  VOS_NT_WINDOWS32
#define  VOS_NT_WINDOWS32                    0x00040004L
#endif

#ifndef  VFT_APP
#define  VFT_APP                             0x00000001L
#endif

#ifndef  VFT_DLL
#define  VFT_DLL                             0x00000002L
#endif

;######################################################################

; file version info

VS_VERSION_INFO VERSIONINFO
FILEVERSION     1,0,0,0
PRODUCTVERSION  1,0,0,0
FILEOS          VOS_NT_WINDOWS32
FILETYPE        VFT_APP
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904E4"
    BEGIN
      VALUE "CompanyName",      "Company\000"
      VALUE "FileDescription",  "App Name\000"
      VALUE "FileVersion",      "1.0\000"
      VALUE "LegalCopyright",   "\251 2012 Your Name Here\000"
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x409, 0x4E4
  END
END

;######################################################################

TouEnMasm

I have this one who work in a dll
Try a comparison

Quote
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION   00,07,03,2009
PRODUCTVERSION   00,07,03,2009
FILEFLAGSMASK   VS_FFI_FILEFLAGSMASK
FILEFLAGS   VS_FF_PRERELEASE
FILEOS   VOS_NT_WINDOWS32
FILETYPE   VFT_APP
FILESUBTYPE   0   // not used
BEGIN
   BLOCK "StringFileInfo"
   BEGIN
   BLOCK "040C04E4"   //Block: language ID = French, char set = Windows, Multilingual
   BEGIN
      VALUE   "CompanyName",   "Yves Luce\0"
      VALUE   "FileDescription",   "IDE pour Masm32\0"
      VALUE   "FileVersion",   "00,07,03,2009\0"
      VALUE   "InternalName",   "editmasm\0"
      VALUE   "OriginalFilename",   "editmasm.dll\0"
      VALUE   "ProductName",   "Editmasm  version 3.0\0"
      VALUE   "ProductVersion",   "3.0\0"
      VALUE   "Comments",   "http://luce.yves.pagesperso-orange.fr//\0"
      VALUE   "LegalCopyright",   "Freeware for non commercial use\0"
   END
   END
   BLOCK "VarFileInfo"
   BEGIN
   VALUE   "Translation", 0x040C, 1252
   END
END
Fa is a musical note to play with CL

FlySky

I've got it working.
It was a very stupid linker mistake on my end. I wasn't linking the resource properly  :icon_redface: