Debugging DTWAIN Applications

Top  Previous  Next

Debugging a DTWAIN application is allowed within a debugger such as found in Microsoft Visual Studio.   However, please be aware that some TWAIN drivers will not work properly under a debugger.  The reason for this is that the manufacturer of the TWAIN driver has purposefully disallowed running their driver under a debugging environment.

 

For example, the CanoScan LIDE series of drivers disallows debugging of the driver, and any application must run outside of a debugging environment for these particular scanners to work properly.  This particular driver will fail to open (functions such as DTWAIN_OpenSource or DTWAIN_SelectSource will fail for this driver if running under a debugger).

 

Therefore if you have a TWAIN driver that runs erratically or fails to open when debugging an application, your only option is to run your application outside the debugger.