// List of all error codes, Version 4.0.0.0

#define TOCR_OK 0

// Error codes returned by an API function

#define TOCRERR_ILLEGALJOBNO				 1
#define TOCRERR_FAILLOCKDB					 2
#define TOCRERR_NOFREEJOBSLOTS				 3
#define TOCRERR_FAILSTARTSERVICE			 4
#define TOCRERR_FAILINITSERVICE				 5
#define TOCRERR_JOBSLOTNOTINIT				 6
#define TOCRERR_JOBSLOTINUSE				 7
#define TOCRERR_SERVICEABORT				 8
#define TOCRERR_CONNECTIONBROKEN			 9
#define TOCRERR_INVALIDSTRUCTID				10
#define TOCRERR_FAILGETVERSION				11
#define TOCRERR_FAILLICENCEINF				12
#define TOCRERR_LICENCEEXCEEDED				13
#ifdef RESELLER1
#define TOCRERR_INCORRECTLICENCE			14
#define TOCRERR_MISMATCH					15
#endif
#define TOCRERR_JOBSLOTNOTYOURS				16

#define TOCRERR_FAILGETJOBSTATUS1			20
#define TOCRERR_FAILGETJOBSTATUS2			21
#define TOCRERR_FAILGETJOBSTATUS3			22
#define TOCRERR_FAILCONVERT					23
#define TOCRERR_FAILSETCONFIG				24
#define TOCRERR_FAILGETCONFIG				25

#define TOCRERR_FAILDOJOB1					30
#define TOCRERR_FAILDOJOB2					31
#define TOCRERR_FAILDOJOB3					32
#define TOCRERR_FAILDOJOB4					33
#define TOCRERR_FAILDOJOB5					34
#define TOCRERR_FAILDOJOB6					35
#define TOCRERR_FAILDOJOB7					36
#define TOCRERR_FAILDOJOB8					37
#define TOCRERR_FAILDOJOB9					38
#define TOCRERR_FAILDOJOB10					39
#define TOCRERR_UNKNOWNJOBTYPE1				40
#define TOCRERR_JOBNOTSTARTED1				41
#define TOCRERR_FAILDUPHANDLE				42

#define TOCRERR_FAILGETJOBSTATUSMSG1		45
#define TOCRERR_FAILGETJOBSTATUSMSG2		46

#define TOCRERR_FAILGETNUMPAGES1			50
#define TOCRERR_FAILGETNUMPAGES2			51
#define TOCRERR_FAILGETNUMPAGES3			52
#define TOCRERR_FAILGETNUMPAGES4			53
#define TOCRERR_FAILGETNUMPAGES5			54

#define TOCRERR_FAILGETRESULTS1				60
#define TOCRERR_FAILGETRESULTS2				61
#define TOCRERR_FAILGETRESULTS3				62
#define TOCRERR_FAILGETRESULTS4				63
#define TOCRERR_FAILALLOCMEM100				64
#define TOCRERR_FAILALLOCMEM101				65
#define TOCRERR_FILENOTSPECIFIED			66
#define TOCRERR_INPUTNOTSPECIFIED			67
#define TOCRERR_OUTPUTNOTSPECIFIED			68

#define TOCRERR_FAILROTATEBITMAP			70

#define TOCERR_TWAINPARTIALACQUIRE			80
#define TOCERR_TWAINFAILEDACQUIRE			81
#define TOCERR_TWAINNOIMAGES				82
#define TOCERR_TWAINSELECTDSFAILED			83

// Error codes which may be seen in a message box or console but will not be returned by an API function
/*
#define TOCRERR_INVALIDSERVICESTART			1000
#define TOCRERR_FAILSERVICEINIT				1001
#define TOCRERR_FAILLICENCE1				1002
#define TOCRERR_FAILSERVICESTART			1003
#define TOCRERR_UNKNOWNCMD					1004
#define TOCRERR_FAILREADCOMMAND				1005
#define TOCRERR_FAILREADOPTIONS				1006
#define TOCRERR_FAILWRITEJOBSTATUS1			1007
#define TOCRERR_FAILWRITEJOBSTATUS2			1008
#define TOCRERR_FAILWRITETHREADH			1009
#define TOCRERR_FAILREADJOBINFO1			1010
#define TOCRERR_FAILREADJOBINFO2			1011
#define TOCRERR_FAILREADJOBINFO3			1012
#define TOCRERR_FAILWRITEPROGRESS			1013
#define TOCRERR_FAILWRITEJOBSTATUSMSG		1014
#define TOCRERR_FAILWRITERESULTSSIZE		1015
#define TOCRERR_FAILWRITERESULTS			1016
#define TOCRERR_FAILWRITEAUTOORIENT			1017
#define TOCRERR_FAILLICENCE2				1018
#define TOCRERR_FAILLICENCE3				1019
#define TOCRERR_TOOMANYCOLUMNS				1020
#define TOCRERR_TOOMANYROWS					1021
#define TOCRERR_EXCEEDEDMAXZONE				1022
#define TOCRERR_NSTACKTOOSMALL				1023
#define TOCRERR_ALGOERR1					1024
#define TOCRERR_ALGOERR2					1025
#define TOCRERR_EXCEEDEDMAXCP				1026
#define TOCRERR_CANTFINDPAGE				1027
#define TOCRERR_UNSUPPORTEDIMAGETYPE		1028
#define TOCRERR_IMAGETOOWIDE				1029
#define TOCRERR_IMAGETOOLONG				1030
#define TOCRERR_UNKNOWNJOBTYPE2				1031
#define TOCRERR_TOOWIDETOROT				1032
#define TOCRERR_TOOLONGTOROT				1033
#define TOCRERR_INVALIDPAGENO				1034
#define TOCRERR_FAILREADJOBTYPENUMBYTES		1035
#define TOCRERR_FAILREADFILENAME			1036
#define TOCRERR_FAILSENDNUMPAGES			1037
#define TOCRERR_FAILOPENCLIP				1038
#define TOCRERR_NODIBONCLIP					1039
#define TOCRERR_FAILREADDIBCLIP				1040
#define TOCRERR_FAILLOCKDIBCLIP				1041
#define TOCRERR_UNKOWNDIBFORMAT				1042
#define TOCRERR_FAILREADDIB					1043
#define TOCRERR_NOXYPPM						1044
#define TOCRERR_FAILCREATEDIB				1045
#define TOCRERR_FAILWRITEDIBCLIP			1046
#define TOCRERR_FAILALLOCMEMDIB				1047
#define TOCRERR_FAILLOCKMEMDIB				1048
#define TOCRERR_FAILCREATEFILE				1049
#define TOCRERR_FAILOPENFILE1				1050
#define TOCRERR_FAILOPENFILE2				1051
#define TOCRERR_FAILOPENFILE3				1052
#define TOCRERR_FAILOPENFILE4				1053
#define TOCRERR_FAILREADFILE1				1054
#define TOCRERR_FAILREADFILE2				1055
#define TOCRERR_FAILFINDDATA1				1056
#define TOCRERR_TIFFERROR1					1057
#define TOCRERR_TIFFERROR2					1058
#define TOCRERR_TIFFERROR3					1059
#define TOCRERR_TIFFERROR4					1060
#define TOCRERR_FAILREADDIBHANDLE			1061
#define TOCRERR_PAGETOOBIG					1062
#define TOCRERR_FAILSETTHREADPRIORITY		1063
#define TOCRERR_FAILSETSRVERRORMODE			1064

#define TOCRERR_FAILREADFILENAME1			1070
#define TOCRERR_FAILREADFILENAME2			1071
#define TOCRERR_FAILREADFILENAME3			1072
#define TOCRERR_FAILREADFILENAME4			1073
#define TOCRERR_FAILREADFILENAME5			1074

#define TOCRERR_FAILREADFORMAT1				1080
#define TOCRERR_FAILREADFORMAT2				1081

#define TOCRERR_FAILALLOCMEM1				1101
#define TOCRERR_FAILALLOCMEM2				1102
#define TOCRERR_FAILALLOCMEM3				1103
#define TOCRERR_FAILALLOCMEM4				1104
#define TOCRERR_FAILALLOCMEM5				1105
#define TOCRERR_FAILALLOCMEM6				1106
#define TOCRERR_FAILALLOCMEM7				1107
#define TOCRERR_FAILALLOCMEM8				1108
#define TOCRERR_FAILALLOCMEM9				1109
#define TOCRERR_FAILALLOCMEM10				1110

#define TOCRERR_FAILWRITEMMFH				1150
#define TOCRERR_FAILREADACK					1151
#define TOCRERR_FAILFILEMAP					1152
#define TOCRERR_FAILFILEVIEW				1153

// dekernfcz.cpp
#define	TOCRERR_BUFFEROVERFLOW1				2001

// fczbreak.cpp
#define	TOCRERR_MAPOVERFLOW					2002
#define	TOCRERR_REBREAKNEXTCALL				2003
#define	TOCRERR_REBREAKNEXTDATA				2004
#define	TOCRERR_REBREAKEXACTCALL			2005
#define	TOCRERR_MAXZCANOVERFLOW1			2006
#define	TOCRERR_MAXZCANOVERFLOW2			2007
#define	TOCRERR_BUFFEROVERFLOW2				2008
#define TOCRERR_NUMKCOVERFLOW				2009
#define	TOCRERR_BUFFEROVERFLOW3				2010
#define	TOCRERR_BUFFEROVERFLOW4				2011
#define	TOCRERR_SEEDERROR					2012

// fczclassify.cpp
#define	TOCRERR_FCZYREF						2020
#define TOCRERR_MAXTEXTLINES1				2021
#define	TOCRERR_LINEINDEX					2022
#define	TOCRERR_MAXFCZSONLINE				2023
#define TOCRERR_MEMALLOC1					2024
#define TOCRERR_MERGEBREAK					2025

// fczcleanup.cpp
#define	TOCRERR_DKERNPRANGE1				2030
#define	TOCRERR_DKERNPRANGE2				2031
#define	TOCRERR_BUFFEROVERFLOW5				2032
#define	TOCRERR_BUFFEROVERFLOW6				2033

// fczlex.cpp
#define	TOCRERR_FILEOPEN1					2040
#define	TOCRERR_FILEOPEN2					2041
#define	TOCRERR_FILEOPEN3					2042
#define	TOCRERR_FILEREAD1					2043
#define	TOCRERR_FILEREAD2					2044
#define	TOCRERR_SPWIDZERO					2045
#define TOCRERR_FAILALLOCMEMLEX1			2046
#define TOCRERR_FAILALLOCMEMLEX2			2047

// fczmap.cpp
#define	TOCRERR_BADOBWIDTH					2050
#define	TOCRERR_BADROTATION					2051

// fcznoise.cpp
#define	TOCRERR_REJHIDMEMALLOC				2055


// fczselfref.cpp
#define	TOCRERR_UIDA						2070
#define	TOCRERR_UIDB						2071
#define	TOCRERR_ZEROUID						2072
#define	TOCRERR_CERTAINTYDBNOTINIT			2073
#define	TOCRERR_MEMALLOCINDEX				2074
#define	TOCRERR_CERTAINTYDB_INIT			2075
#define	TOCRERR_CERTAINTYDB_DELETE			2076
#define	TOCRERR_CERTAINTYDB_INSERT1			2077
#define	TOCRERR_CERTAINTYDB_INSERT2			2078
#define	TOCRERR_OPENXORNEAREST				2079
#define	TOCRERR_XORNEAREST					2079

// netproc.cpp
#define	TOCRERR_OPENSETTINGS				2080
#define	TOCRERR_READSETTINGS1				2081
#define	TOCRERR_READSETTINGS2				2082
#define	TOCRERR_BADSETTINGS					2083
#define	TOCRERR_WRITESETTINGS				2084
#define	TOCRERR_MAXSCOREDIFF				2085

// pnnclass5.cpp
#define	TOCRERR_YDIMREFZERO1				2090
#define	TOCRERR_YDIMREFZERO2				2091
#define	TOCRERR_YDIMREFZERO3				2092
#define	TOCRERR_ASMFILEOPEN					2093
#define	TOCRERR_ASMFILEREAD					2094
#define	TOCRERR_MEMALLOCASM					2095
#define	TOCRERR_MEMREALLOCASM				2096
#define	TOCRERR_SDBFILEOPEN					2097
#define	TOCRERR_SDBFILEREAD					2098
#define	TOCRERR_SDBFILEBAD1					2099
#define	TOCRERR_SDBFILEBAD2					2100
#define	TOCRERR_MEMALLOCSDB					2101
#define	TOCRERR_DEVEL1						2102
#define	TOCRERR_DEVEL2						2103
#define	TOCRERR_DEVEL3						2104
#define	TOCRERR_DEVEL4						2105
#define	TOCRERR_DEVEL5						2106
#define	TOCRERR_DEVEL6						2107
#define	TOCRERR_DEVEL7						2108
#define	TOCRERR_DEVEL8						2109
#define	TOCRERR_DEVEL9						2110
#define	TOCRERR_DEVEL10						2111
#define	TOCRERR_DEVEL11						2112
#define	TOCRERR_DEVEL12						2113
#define	TOCRERR_DEVEL13						2114
#define	TOCRERR_FILEOPEN4					2115
#define	TOCRERR_FILEOPEN5					2116
#define	TOCRERR_FILEOPEN6					2117
#define	TOCRERR_FILEREAD3					2118
#define	TOCRERR_FILEREAD4					2119
#define	TOCRERR_ZOOMGTOOBIG					2120
#define	TOCRERR_ZOOMGOUTOFRANGE				2121

// fczoutput.cpp
#define	TOCRERR_MEMALLOCRESULTS				2130

// vsub.cpp
#define	TOCRERR_MEMALLOCHEAP				2140
#define	TOCRERR_HEAPNOTINITIALISED			2141
#define	TOCRERR_MEMLIMITHEAP				2142
#define	TOCRERR_MEMREALLOCHEAP				2143
#define	TOCRERR_MEMALLOCFCZBM				2144
#define	TOCRERR_FCZBMOVERLAP				2145
#define	TOCRERR_FCZBMLOCATION				2146
#define	TOCRERR_MEMREALLOCFCZBM				2147
#define	TOCRERR_MEMALLOCFCHBM				2148
#define	TOCRERR_MEMREALLOCFCHBM				2149
*/