DTWAIN Error Handling
When an error condition occurs within DTWAIN, the last error can be retrieved. Usually if a FALSE or error condition is returned, your application can check the error code. All DTWAIN functions that return FALSE, NULL, or whatever a "failure" return value is, is done so for a known reason, and that reason can be discovered by calling DTWAIN_GetLastError. The error return value can be one of the values listed in the DTWAIN Error Values.
The DTWAIN_GetErrorString function allows your application to get a meaningful error message given an error number.
By default, DTWAIN will buffer the last 50 errors that occur during the running of the application. To access the error buffer, the DTWAIN_GetErrorBuffer function is used. To increase or decrease the number of errors that are buffered, the DTWAIN_SetErrorBufferThreshold function is used. To clear the error buffer, the DTWAIN_ClearErrorBuffer function is used.
|