You have to create a user defined build step that makes this informatiomn available to your application before compiling. See
Understanding Custom Build Steps and Build Events (VS 2010)[
^].
A possible solution would be writing a batch / command file that gets the version string from the DLL and creates a header file containing a single line with the definition for the version string. Your about box dialog source file can the inlcude this header file.
To get the version from the DLL you need a command line tool. One solution is using the PowerShell with
(Get-Item path-to-dll).VersionInfo.FileVersion
Another solution is to use the
Sigcheck[
^] utility from the SysInternal tools.
Or write our own utility that reads the information using the
GetFileVersionInfo function (Windows)[
^] and creates the header file.