Reputation: 3729
How can I programmatically read what version of software I am using?
If I use Visual Studio to create a project, and that project includes a resource (.rc) file and the version is specified in that file, how can I use code to "read" the version information?
That is, if I want the software to report what version it is when it is run, and the only place this information is stored is in the .rc
file, what can I do?
Upvotes: 1
Views: 313
Reputation: 17624
You can use GetFileVersionInfo with the name of the current executable/dll to read the version information, which was embedded into the exe/dll when it was built from the resource file.
Upvotes: 1
Reputation: 52159
Assuming that you are using VERSIONINFO in your resource files, use these functions.
Upvotes: 0