| Support
- Delphi, C++ Builder and TWAIN floating-point errors
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 Borland Delphi or C++ Builder.
This
notice applies to developers working in Borland Delphi and C++ Builder,
and to all TWAIN DataSource developers.
Summary:
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 (Canon Network
ScanGear 1.4, 1.5, Leica DFC 280) 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 Borland Delphi or C++ Builder.
Delphi
and C++ Builder Application Developers: This Borland
page explains how 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 need to study this issue 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 support@dosadi.com
if you want help figuring out how to do this.
|