Previous Up Next Reference

Exceptions

General Exceptions Generated by twainmodule

excSMLoadFileFailed The attempt to load the Source Manager DLL (TWAIN_32.DLL) failed. This indicates that TWAIN is not installed on the PC.
excSMGetProcAddressFailed The TWAIN_32.DLL was loaded, but the entry point could not be found in the module. This indicates that the TWAIN_32.DLL is not the correct DLL, and is perhaps renamed from something else.
excSMOpenFailed The TWAIN_32.DLL was loaded. However, the attempt to open the TWAIN Source Manager failed. The return code is in the exc_value. Check this value against the TWRC_ values in the TWAIN specification.
excDSOpenFailed The attempt to open the data source failed. The return code is given in the exc_value which can be checked against the TWRC_ values in the TWAIN specification.
excDSNoImageAvailable An attempt was made to retrieve an image from the Source when there was none available, i.e. the system is not in state 6.
excDSTransferCancelled The user aborted the image transfer using the TWAIN source user interface.
excCapabilityFormatNotSupported An attempt was made to set a capability using a format which is not supported by the twainmodule.
excBufferOverrun The call to the DSM_Entry() resulted in an overrun of the programs buffer. The exc_value gives the triplet of the call.
excGlobalHeap An error occurred using the global heap. Check the validity of the handle passed to the function.
excImageFormat The twainmodule could not support the image format passed. This is due to the image being compressed.
excFileError There was an error opening a file. This error is raised in the DIB conversion functions.
excMemoryError There was an error allocating memory in the twainmodule. See the exc_value for details of the memory size.
excParamError There is an error in the type of a parameter to the function. Ensure that the TWTY_ value matches the parameter type passed in.
excInternalErrorAn internal logic error occurred. See the exc_value for more detail.

Exceptions Mapped from Source Condition Codes

excTWCC_SUCCESSIt worked!
excTWCC_BUMMERFailure due to unknown causes
excTWCC_LOWMEMORYNot enough memory to perform operation
excTWCC_NODSNo Data Source
excTWCC_MAXCONNECTIONSDS is connected to max possible applications
excTWCC_OPERATIONERRORDS or DSM reported error, application shouldn't
excTWCC_BADCAPUnknown capability
excTWCC_BADPROTOCOLUnrecognized MSG DG DAT combination
excTWCC_BADVALUEData parameter out of range
excTWCC_SEQERRORDG DAT MSG out of expected sequence
excTWCC_BADDESTUnknown destination Application/Source in DSM_Entry
excTWCC_CAPUNSUPPORTEDCapability not supported by source
excTWCC_CAPBADOPERATIONOperation not supported by capability
excTWCC_CAPSEQERRORCapability has dependancy on other capability
excTWCC_DENIEDFile System operation is denied (file is protected)
excTWCC_FILEEXISTSOperation failed because file already exists
excTWCC_FILENOTFOUNDFile not found
excTWCC_NOTEMPTYOperation failed because directory is not empty
excTWCC_PAPERJAMThe feeder is jammed
excTWCC_PAPERDOUBLEFEEDThe feeder detected multiple pages
excTWCC_FILEWRITEERRORError writing the file (meant for things like disk full conditions)
excTWCC_CHECKDEVICEONLINEThe device went offline prior to or during this operation
excTWCC_UNKNOWNSource specific Value


Previous Up Next Reference