LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I programmatically retrieve the CVI Target Version Settings (e.g. File Version, Copyright, etc) in my CVI application?

Is there any way that I can programmatically retrieve the CVI Target Version Settings (e.g. File Version, Copyright, etc) in my CVI application?
 
I am using LabWindows/CVI version 7.0.
 
The settings that I'd like to retrieve within my application are those that are set under Build | Target Settings... | Version Info...
 
e.g.
      File Version
      Product Version
      Company Name
      Legal Copyright
 
Thanks,
Darren
 

Message Edited by Darren Draper on 01-16-2006 02:03 AM

Message 1 of 10
(5,889 Views)
Hi Darren!
 
   From CVI help:

    Version Info—Opens the Version Info dialog box. You can enter version information for the DLL in this dialog box. LabWindows/CVI saves the version information in the DLL as a standard Windows version resource. You can obtain the information from the DLL by using the Windows SDK GetFileVersionInfo and GetFileVersionInfoSize functions.


Thank you for giving me the opportunity of looking for these informations! Smiley Happy

   Let me know if this helps!!!!!

   greetings!

graziano

Message 2 of 10
(5,880 Views)
Hi Graziano,
 
Thanks for your quick and accurate reply.  This has solved my problem. 
 
Also, the example supplied with LabWindows\CVI is useful, for showing how it works:  see the NI example in "samples\sdk\verinfo\verinfo.cws".
 
Many thanks,
Darren
 
0 Kudos
Message 3 of 10
(5,862 Views)

Hi, I am using CVI 6.0.

 

I would also like to query my program's version found in Target Settings --> Version Info --> File Version. The sample SDK "verinfo.c" and its project do not compile. Any advice?

 

Thanks in advance!

 

0 Kudos
Message 4 of 10
(5,316 Views)

Hello TurboMetrologist,

which error do you receive while compiling?

 

I was succesfull both in running the source code from the IDE and in compiling it with CVI 6.0.0 (105) full development system.

 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 5 of 10
(5,306 Views)

'Unable to create file "c:\...\MeasurementStudio\CVI\samples\sdk\verinfo\verinfo_dbg.exe" (File access permission denied)'

Is this because I can't see the version.lib file in the folder?

0 Kudos
Message 6 of 10
(5,304 Views)

Well, "File access permission denied" claims for an authorization problem Smiley Wink . I suggest you double check file attributes in the project directory: it could be that you have downloaded this example from a CD and the read-only attribute has not been cleared.

The library does not reside in the example folder: as you can see by selecting View >> Show full pathnames in the project window, it should be in ....CVI\sdk\lib folder.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 10
(5,301 Views)

Turbo,

 

Roberto is correct. This is probably happening because you installed CVI 6.0 in Windows 7 or Vista, with User Account Control enabled. This is a very old version of CVI that did not support those OSes, and therefore it installed its examples to a non-writable location (C:\Program Files...). This is probably why you do not have write permission to create the .exe in this location. If you copy the CVI examples folder to a different location, you might get around this problem.

 

Luis

Message 8 of 10
(5,292 Views)

Yes thank you, I copied the folder to another location and it ran the debug exe just fine. Thanks.

0 Kudos
Message 9 of 10
(5,273 Views)

Damned UAC! You never end up changing all that was perfectly working before its arrival!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 10 of 10
(5,267 Views)