Versioning DLLs

hi everbody....
a stupid question: how to increase the version number of my new DLL after/while compile? At the moment I dont have any version in my DLL at all.
is there another method to version DLLs?
I use Visual C++ 2008

P.S. when i press Alt+Enter on the c:\WINDOWS\SYSTEM32\wuapi.dll, there is a TAB <Version>, I want to have the same :)

Thanks!
You need a resource (.rc) file.
Here's a template you can use:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
1 VERSIONINFO
#ifdef _DEBUG
#include <winver.h>
FILEFLAGS VS_FF_DEBUG
FILEVERSION 9999, 99, 99, 0
PRODUCTVERSION 9999, 99, 99, 0
#else
FILEFLAGS 32
//Note: personally, I prefer to set major to the year, minor to the month, and
//revision to the day. I find it much more useful than version numbers.
FILEVERSION <major>, <minor>, <revision>, 0
PRODUCTVERSION <major>, <minor>, <revision>, 0
#endif

FILEOS 4
FILETYPE 1

#ifdef _DEBUG
{
	BLOCK "StringFileInfo" {
		BLOCK "040904B0" {
			VALUE "FileDescription", "program"
			VALUE "OriginalFilename", "program.exe"
			VALUE "CompanyName", "you"
			VALUE "FileVersion", "Debug"
			VALUE "LegalCopyright", "Copyright (c) 2009, you"
			VALUE "ProductName", "program"
			VALUE "ProductVersion", "Debug"
		}
	}
	BLOCK "VarFileInfo" {
		VALUE "Translation", 0x0409, 0x04B0
	}
}
#else
{
	BLOCK "StringFileInfo" {
		BLOCK "040904B0" {
			VALUE "FileDescription", "program"
			VALUE "OriginalFilename", "program.exe"
			VALUE "CompanyName", "you"
			VALUE "FileVersion", "major.minor.revision"
			VALUE "LegalCopyright", "Copyright (c) 2009, you"
			VALUE "ProductName", "program"
			VALUE "ProductVersion", "major.minor.revision"
		}
	}
	BLOCK "VarFileInfo" {
		VALUE "Translation", 0x0409, 0x04B0
	}
}
#endif 
Last edited on
I have Visual C++ 2008 express edition. there is no New Item for resource (.rc) file.
how to be?

thx again!
Create the resource file with notepad and include it to your project.
If you want to edit it from VC++ right click on its icon within the IDE and choose "show source"
hi,the better thing is to download visual c++2005 .
i have it and when i'v shecked (.rc) exists.good luck.>.<
Topic archived. No new replies allowed.