Russel
Russel

Reputation: 3729

How can I programmatically read what version of software I am using?

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

Answers (3)

i_am_jorf
i_am_jorf

Reputation: 54600

You want to use GetFileVersion() and related functions.

Upvotes: 1

Saxon Druce
Saxon Druce

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

In silico
In silico

Reputation: 52159

Assuming that you are using VERSIONINFO in your resource files, use these functions.

Upvotes: 0

Related Questions