LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How much software must I uninstall to change External compatibility mode

I have found a problem with CVI 6.0 and the sizeof() operator which gives an improper result if the external compatibility mode is Microsoft C/C++.
with External compatibility mode set to Borland the sizeof operator returns the correct size of a data typedef struct{size = 436 bytes} under MS mode the sizeof operator returns sizeof(struct) = 440.
To fully test this problem I need to change the compatibility mode back to Borland from the install mode of MS.
when I run the install progrma to change the compatibility mode I get the aborted load message for nidaq, easyio, imaq and other libraries. I have a lot of NI software on this machine do I need to uninstall it ALL????? or is there a subset or
shortcut I can follow frm the install discs.
Thanks CMM
P.S. if this problem is persistent I think you may have a problem. If I find it so, I'll send you a note somehow or call a service rep.
0 Kudos
Message 1 of 2
(2,522 Views)
Hi Cody,

It is entirely possible (and correct) for the sizeof() operator to yield different results according to the compatibility mode. Borland uses different structure packing than MSVC. You should be using #pragmas pack preprocessor statements to define the maximum alignment value for sorting memmbers of a structure in memory.

See the following knowledgebase article:

http://pong.ni.com/public.nsf/websearch/5F94E0FD2BD4732786256547007D8EBB?OpenDocument

If you still want to change compatibility modes to test this issue (although trust me, it is not), you'll have to run the NI-DAQ setup.exe to install the DAQ libraries for the new compatibility mode. This will not reinstall NI-DAQ. It will just take you to the DAQ libraries section of the installer.


Let me know if you have other related questions
Regards,
Azucena
Message 2 of 2
(2,522 Views)