07-02-2009 01:55 AM
hExe = LoadLibrary( sSource );hRes = FindResourceA( hExe, MAKEINTRESOURCE( VS_VERSION_INFO ), RT_VERSION ); hResLoad = LoadResource( hExe, hRes ); lpResLock = LockResource( hResLoad ); hUpdateRes = BeginUpdateResourceA( sDest, FALSE ); result = UpdateResource( hUpdateRes, RT_VERSION, MAKEINTRESOURCE( VS_VERSION_INFO ), MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), lpResLock, SizeofResource( hExe, hRes ) ); EndUpdateResource( hUpdateRes, FALSE );
07-06-2009
06:56 AM
- last edited on
01-30-2025
10:34 AM
by
Content Cleaner
Hello,
In versions of LabVIEW up to and including 7.1, there is no supported method to add version information to LabVIEW executables.
There is a possibility to edit <LabVIEW_Install_DIR>\applibs\lvapp.lib in Visual C's resource editor and modify the version before you build the application.
However, this method is not supported by NI and you will have to repeat this step every time you want to change the version.
For your reference some articles about how to get this info as of LabVIEW 8.0.
Determining the Version of an Executable Built with LabVIEW
https://forums.ni.com/t5/Example-Code/Determining-the-Version-of-an-Executable-Built-with-LabVIEW/ta...
08-05-2009 06:01 AM
tanks for your reply.
In the meantime we switched to Labview v8.6, and the problem disappeared: using the code above does what I want, ie it replaces the VERSION_INFO resource in the built executable as expected.