This notice applies to developers working in Delphi and Borland C++ Builder, and all TWAIN DataSource developers.
Some TWAIN drivers will work smoothly when invoked from a Microsoft-compiled application, but will throw fatal run-time errors when accessed from an application written in Delphi or C++ Builder.
Why: Floating point computations can generate exceptions such as overflow, underflow, divide-by-zero.
In Microsoft Visual C/C++ applications these exceptions are suppressed by default.
Delphi and C++ Builder enable exceptions for overflow and divide-by-zero by default. Some TWAIN drivers generate these floating-point exceptions during normal operation! As a result those TWAIN drivers will work smoothly when invoked from a Microsoft-compiled application, but will throw fatal run-time errors when accessed from an application written in Delphi or C++ Builder. The following TWAIN drivers are implicated:
- Epson GT-S series (GT-S50, GT-S80)
- Canon Network ScanGear 1.4, 1.5
- Leica DFC 280
Delphi and C++ Builder Application Developers:
The simplest solution is to suppress these exceptions in your applications, in effect simulating the Microsoft run-time configuration for floating-point. If your application makes sophisticated use of floating-point, you will want to review the implications carefully.
TWAIN DataSource Developers:
Test your DataSources with at least one application written in Delphi or C++ Builder! Or, in your DS main entry, save the current floating-point control word, and disable floating-point exceptions. Before returning, clear any pending exceptions and then restore the floating-point control word.
Contact Technical Support if you want help figuring out how to do this.