Click to See Complete Forum and Search --> : setting original file name, version etc.
Pisto
October 16th, 2008, 09:07 AM
I use mingw with eclipse CDT, and I want to set the version number (major minor etc) of my dll. Also, how can I get the name of a module if I have an address or a HINSTANCE belonging to it? alternatively, I need a function like GetFileVersionInfo that takes such address/HISTANCE instead of a filename.
thx
kirants
October 16th, 2008, 12:25 PM
Also, how can I get the name of a module if I have an address or a HINSTANCE belonging to it?
GetModuleFileName (http://msdn.microsoft.com/en-us/library/ms683197(VS.85).aspx)
Pisto
October 18th, 2008, 08:05 AM
reading deeper the msdn of that function, I found that giving NULL as the module retrieves the current process name, exactly what I need.
now, how to set my DLL's version number original name etc?
Codeplug
October 18th, 2008, 09:20 AM
MinGW comes with the resource compiler windres.exe.
http://rabbit-hole.blogspot.com/2008/01/embedding-dll-file-version-information.html
gg
Pisto
October 20th, 2008, 06:45 AM
thanks.
a lst little question: I tried to fool eclipse giving my resource file a .c extension and changing the building command for that file (to windres instead of gcc), but it didn't work (I can't remove the -O0 parameter). How can I set my project to make the .o file from the resource automatically?
Codeplug
October 20th, 2008, 08:15 AM
I've never used Eclipse, but I do know google:
http://dev.eclipse.org/newslists/news.eclipse.tools.cdt/msg06748.html
http://dev.eclipse.org/newslists/news.eclipse.tools.cdt/msg06762.html
gg
Pisto
October 21st, 2008, 10:11 AM
ok.
now a little problem with rc format: when I try to compile my resource I always get an error at the last line, even if there are no preprocessing directives. this happens also if I try to compile the scripts generated by windres (I tried doing it with windows/hh.exe).
the file that I'm trying to compile is this:
LANGUAGE 0, 0
1 VERSIONINFO
FILEVERSION 0, 1, 0, 0
PRODUCTVERSION 0, 1, 0, 0
FILEFLAGSMASK 0x3f
FILEOS 0x4
FILETYPE 0x2
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "00000410"
BEGIN
VALUE "CompanyName", "Pisto Inc."
VALUE "FileDescription", "RubberWorm"
VALUE "FileVersion", "1.0.0"
VALUE "InternalName", "wkRubberWorm.dll"
VALUE "OriginalFilename", "wkRubberWorm.dll"
VALUE "ProductName", "RubberWorm"
VALUE "ProductVersion", "RubberWorm"
END
END
C:\MinGW\bin\windres.exe: version.rc:22: syntax error
Damner
October 21st, 2008, 12:02 PM
You forgot the last END :)
Pisto
October 21st, 2008, 01:12 PM
d'oh
I was sure there where only 2 begins.
Thanks for your help.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.