Author Topic: DLL Version Info  (Read 5423 times)

Offline BigAngryDog

  • Multiple posting newcomer
  • *
  • Posts: 75
    • BigAngryDog.com
DLL Version Info
« on: March 13, 2006, 02:37:00 am »
Hi there,

I have been using rc files to set exe version info without problem.

However, when I try the same with a DLL project, the resulting binary has no version info.

How do I set DLL version info with C:B?

Thanks
BigAngryDog.com

Offline BigAngryDog

  • Multiple posting newcomer
  • *
  • Posts: 75
    • BigAngryDog.com
Re: DLL Version Info
« Reply #1 on: March 13, 2006, 03:58:53 am »
If it helps, here's the section of my rc file:

I use a "FILETYPE 0x0L" for exes, and I get version info no problems. But with a DLL there is nothing.


Code: [Select]
#include "version_info.h"

VS_VERSION_INFO VERSIONINFO
FILEVERSION MAJOR,MINOR,PATCH,1
PRODUCTVERSION MAJOR,MINOR,PATCH,1

FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
  FILEFLAGS 0x1L
#else
  FILEFLAGS 0x0L
#endif
//FILEOS VOS__WINDOWS32
// VOS_UNKNOWN VOS_DOS VOS_NT VOS__WINDOWS32 VOS_DOS_WINDOWS32 VOS_NT_WINDOWS32

FILETYPE 0x1L
// VFT_APP VFT_DLL VFT_DRV VFT_FONT VFT_VXD VFT_STATIC_LIB

FILESUBTYPE 0x0L
{
  BLOCK "StringFileInfo"
  {
    BLOCK "040904b0"
    {
      VALUE "Comments", ""
      VALUE "CompanyName", COMPANYNAME
      VALUE "FileDescription", PRODUCTNAME
      VALUE "InternalName", ""
      VALUE "LegalCopyright", COPYRIGHT
      VALUE "OriginalFilename", ""
      VALUE "ProductName", PRODUCTNAME
      VALUE "FileVersion",  VERSIONSTR
      VALUE "ProductVersion", VERSIONSTR
    }
  }
  BLOCK "VarFileInfo"
  {
    VALUE "Translation", 0x409, 1200
    // 0x409 US 0x0809 UK
    // 1200 Unicode
  }
}

Am I doing anything wrong?
BigAngryDog.com

Offline keenblade

  • Multiple posting newcomer
  • *
  • Posts: 36
  • tao
    • keenblade
Re: DLL Version Info
« Reply #2 on: March 13, 2006, 04:28:04 am »
I use the code which I ripped from dev-c++ resource file. It works for dll files, too.
Code: [Select]
#include <windows.h> // include for version info constants

1 VERSIONINFO
FILEVERSION 0,1,1,1
PRODUCTVERSION 0,1,1,1
FILETYPE VFT_APP
{
  BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
VALUE "CompanyName", ""
VALUE "FileVersion", ""
VALUE "FileDescription", "Developed using the Code::Blocks"
VALUE "InternalName", ""
VALUE "LegalCopyright", ""
VALUE "LegalTrademarks", ""
VALUE "OriginalFilename", ""
VALUE "ProductName", ""
VALUE "ProductVersion", ""
}
}
  BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409, 1200
}
}
« Last Edit: March 13, 2006, 04:49:48 am by keenblade »
Anyway it\'s all the same at the end...

Offline BigAngryDog

  • Multiple posting newcomer
  • *
  • Posts: 75
    • BigAngryDog.com
Re: DLL Version Info
« Reply #3 on: March 13, 2006, 04:57:37 am »
Thanks.

Believe it may have been this line causing the problem.

FILESUBTYPE 0x0L

Cheers :)
BigAngryDog.com