BiTwain.dll specific error codes

The last error code in the BiTwain.dll can be retrieved by the GetBiTwainLastError function.

The GetErrorString function can be used to get the error message associated with error code.

 

Please note that each DLL has a different Error code function and Error String function.

Error Code number

Error Code

Meaning

0

TW_OK

Operation was successful.

1

TW_GENERAL_ERROR

General internal error.

2

TW_NOTOPEN

Could not find TWAIN driver or could not load DLL.

3

TW_TRANSFERFAILURE

Data transfer failure. Possibly not enough memory.

4

TW_OPENDSMFAILURE

Could not open Data Source Manager.

5

TW_COMPATIBLITY

The TWAIN driver version is not supported.

6

TW_OPENDSFAILURE

Could not open Data Source.

7

TW_CLOSEDSFAILURE

Could not close Data Source.

8

TW_SELECTDSFAILURE

Data Source selection by the Data Source Manager failed.

9

TW_NOTWAINDLL

Twain dll is missing.

10

TW_LOADED

Twain dll is already loaded.

11

TW_INVALIDPARAMETER

Parameter is invalid.

12

TW_NOTTIFFDLL

The BiTiff.dll is missing.

13

TW_FILESAVEERROR

Error saving tiff image.

14

TW_NOTDLGDLL

BiDlgs32.dll is missing.

15

TW_SUPPORT_OPERATION

Operation is not supported.

16

TW_HWND_ERROR

Error creating window for getting event from data source.

17

TW_UI_CANCEL

Black Ice specific scan settings dialog was canceled.