Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
27648 Discussions

Access resource VS_VERSION_INFO from code?

mrvogt
Novice
332 Views

I use VS_VERSION_INFO to stamp my EXE with a version number. Is there a way to access that resource file's version information in code so I can write the used EXE version to the output?

0 Kudos
2 Replies
Steve_Lionel
Black Belt Retired Employee
324 Views

Yes. The Windows API routine GetFIleVersionInfo (declared in Intel Fortran supplied module VERSION) retrieves this information from the EXE or DLL you specify. To get the path to the currently running EXE, use GetModuleFileName (KERNEL32) and pass NULL as the hModule argument.

mrvogt
Novice
313 Views
Reply