12-20-2010 01:55 PM
Hello,
I have an application written in CVI and runs with CVI 8.5 in Borlandc compatibility mode. I recently upgraded my CVI to 2010 where Borlandc compatibility mode is no longer supported.
Under CVI 8.5 my application opens binary files, read data (text, unsigned long, chars, etc..) and disply the results. compiling the application in CVI 2010, my application reads the same binary files but the output does not make sense. Is the byte order in binary files, when using the read function, different between Borlandc and microsoft C? how can I use my application to be able to read the binary files generated by another application??
Regards,
Maroun Elias
12-20-2010 05:50 PM
I do not think the change in compatibility mode affects byte alignment: as far as I can remember it is defined at processor level, not at compiler one. Are CVI 8.5 and 2010 installed on the same machine?
On the other hand, a change in CVI version could affect structure packing (I seem to remember to have found such an issue when porting some applications from CVI 6 to 7): if you are reading your binary files through a struct you may want to investigate on default structure packing between the two systems and add the appropriate #pragma pack preprocessor clause to guarantee compatibility between them.