09-23-2004 07:51 AM
09-24-2004 09:05 AM
05-24-2007 09:12 AM
05-25-2007 11:23 AM
05-29-2007 05:11 AM
05-30-2007 05:05 PM
05-31-2007 01:49 AM
David,
please find attached the requested code. It looks a little bit funny because I did an extra log file instrumentation to trace the problem down. Remember that it does not work in the debugger, because in this situation the CVI IDE is not idle and the call of CVI_AppGetProjectVersionInfo() causes the reasonable error message "The operation cannot be performed because a user program is currently running."
To test the tool, just build the release version and run it from the command line when the CVI IDE is open but idle. In this case it works fine. It hangs the CVI IDE when called as a build step.
For completeness I also attached the CVI ActiveX-Server FP I generated for that.
Just to note, I use CVI 8.1 with CVIRTE 8.1.1 on WinXPSP2.
Many thanks
Torsten
06-01-2007 01:26 PM
Hi Torsten,
I can reproduce this hang, and am currently checking with R&D. Thank you for letting us know. I will let you know what we find.
06-01-2007 01:58 PM
Hi Torsten,
Essentially the problem you are encountering is the fact that you can't set the
file and product version of an executable after the build process has already
started. The reason for this is because the file, product version, and build
steps are all stored within the project file. This project file gets loaded
into memory as soon as you start the build process and thus any changes you
make to the file on the hard drive won't be seen. Even though what you
are trying to do won't work, CVI still shouldn't hang so this will have to be
looked into more.
Thus your options for what you are trying to achieve are:
1) Use the CVI command-line compiler which allows you build a CVI project from
the command line and even specify a bunch of arguments including: fileVersion,
productVersion, fileVersionText, productVersionText, etc. See the Using the
LabWindows/CVI Command Line Interface help topic in the NI LabWindows/CVI
Help.
2) Have one "dummy" CVI program programmatically build your
"real" CVI program via CVI's ActiveX server. You would
programmatically set the file and product versions and then call the build
method. This is shown in the build.prj
example located in the <CVI>\samples\activex\cvi\ directory.
I know these aren't the exact solutions you were looking for, but hope this
help.
Best Regards,