Floating Point Exception When Calling Borland C++Builder or Delphi DLL or Executable
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software: N/A
I get a Floating Point Exception when code I wrote in Borland C++Builder or Delphi calls Measurement Studio functions.
It is hard for National Instruments to meet the standards of every compiler. Most compilers suppress floating point exceptions. Borland C++Builder and Delphi do not suppress them. It is easy to turn this option off in both C++Builder and Delphi.
The following code turns them off in C++Builder:
__fastcall TForm1::TForm1(TComponent* Owner): TForm(Owner)
The following code turns them off in Delphi:
const MCW_EM = DWord($133f);
You can set these right before you call into Measurement Studio functions and then undo them afterward.
Turning off Floating Point Exceptions in BCB and Delphi
Report Date: 12/20/2005
Last Updated: 11/12/2008
Document ID: 3SJA58DR