105 #define TWON_PROTOCOLMINOR 4
106 #define TWON_PROTOCOLMAJOR 2
113 #if defined(WIN32) || defined(WIN64) || defined (_WINDOWS)
115 #if defined(_WIN64) || defined(WIN64)
117 #elif defined(WIN32) || defined(_WIN32)
122 #elif defined(__GNUC__)
124 #if defined(__alpha__)\
126 ||defined(__ppc64__)\
127 ||defined(__s390x__)\
128 ||defined(__x86_64__)
136 #elif defined(__BORLAND__)
137 #define TWH_CMP_BORLAND
141 #error Unrecognized compiler
145 #if defined(__APPLE__)
146 #define TWH_CMP_XCODE
150 #include <Carbon/Carbon.h>
155 #if defined(TWH_CMP_MSC) | defined(TWH_CMP_BORLAND)
156 typedef HANDLE TW_HANDLE;
157 typedef LPVOID TW_MEMREF;
158 typedef UINT_PTR TW_UINTPTR;
161 #elif defined(TWH_CMP_XCODE)
162 #define PASCAL pascal
164 typedef Handle TW_HANDLE;
165 typedef char *TW_MEMREF;
166 typedef unsigned char BYTE;
170 typedef unsigned long TW_UINTPTR;
173 typedef unsigned long long TW_UINTPTR;
180 typedef void* TW_HANDLE;
181 typedef void* TW_MEMREF;
182 typedef unsigned char BYTE;
186 typedef unsigned long TW_UINTPTR;
189 typedef unsigned long long TW_UINTPTR;
196 #pragma pack (push, before_twain)
198 #elif defined(TWH_CMP_GNU)
199 #if defined(__APPLE__)
200 #pragma options align = power
202 #pragma pack (push, before_twain)
205 #elif defined(TWH_CMP_BORLAND)
217 #if defined(__APPLE__)
218 typedef unsigned char TW_STR32[34], FAR *pTW_STR32;
219 typedef unsigned char TW_STR64[66], FAR *pTW_STR64;
220 typedef unsigned char TW_STR128[130], FAR *pTW_STR128;
221 typedef unsigned char TW_STR255[256], FAR *pTW_STR255;
223 typedef char TW_STR32[34], FAR *pTW_STR32;
224 typedef char TW_STR64[66], FAR *pTW_STR64;
225 typedef char TW_STR128[130], FAR *pTW_STR128;
226 typedef char TW_STR255[256], FAR *pTW_STR255;
230 typedef char TW_INT8, FAR *pTW_INT8;
231 typedef short TW_INT16, FAR *pTW_INT16;
233 typedef long TW_INT32, FAR *pTW_INT32;
235 typedef int TW_INT32, FAR *pTW_INT32;
237 typedef unsigned char TW_UINT8, FAR *pTW_UINT8;
238 typedef unsigned short TW_UINT16, FAR *pTW_UINT16;
240 typedef unsigned long TW_UINT32, FAR *pTW_UINT32;
242 typedef unsigned int TW_UINT32, FAR *pTW_UINT32;
244 typedef unsigned short TW_BOOL, FAR *pTW_BOOL;
287 TW_UINT8 ItemList[1];
298 TW_MEMREF CallBackProc;
299 #if defined(__APPLE__)
309 TW_MEMREF CallBackProc;
318 TW_HANDLE hContainer;
330 TW_UINT16 ColorSpace;
332 TW_INT16 DeviceDependent;
333 TW_INT32 VersionNumber;
345 TW_UINT32 InfoLength;
352 TW_STR255 DeviceName;
353 TW_UINT32 BatteryMinutes;
354 TW_INT16 BatteryPercentage;
355 TW_INT32 PowerSupply;
358 TW_UINT32 FlashUsed2;
359 TW_UINT32 AutomaticCapture;
360 TW_UINT32 TimeBeforeFirstCapture;
361 TW_UINT32 TimeBetweenCaptures;
376 TW_UINT32 CurrentIndex;
377 TW_UINT32 DefaultIndex;
378 TW_UINT8 ItemList[1];
393 TW_UINT16 ReturnCode;
407 TW_STR255 OutputName;
411 TW_BOOL Subdirectories;
415 TW_UINT32 FileSystemType;
418 TW_STR32 CreateTimeDate;
419 TW_STR32 ModifiedTimeDate;
421 TW_INT32 NewImageSize;
422 TW_UINT32 NumberOfFiles;
423 TW_UINT32 NumberOfSnippets;
424 TW_UINT32 DeviceGroupMask;
425 TW_INT8 Reserved[508];
444 #if defined(__APPLE__)
450 TW_UINT16 ProtocolMajor;
451 TW_UINT16 ProtocolMinor;
452 TW_UINT32 SupportedGroups;
453 TW_STR32 Manufacturer;
454 TW_STR32 ProductFamily;
455 TW_STR32 ProductName;
463 TW_INT32 ImageLength;
464 TW_INT16 SamplesPerPixel;
465 TW_INT16 BitsPerSample[8];
466 TW_INT16 BitsPerPixel;
469 TW_UINT16 Compression;
475 TW_UINT32 DocumentNumber;
476 TW_UINT32 PageNumber;
477 TW_UINT32 FrameNumber;
489 TW_UINT16 Compression;
490 TW_UINT32 BytesPerRow;
495 TW_UINT32 BytesWritten;
501 TW_UINT16 ColorSpace;
502 TW_UINT32 SubSampling;
503 TW_UINT16 NumComponents;
504 TW_UINT16 RestartFrequency;
505 TW_UINT16 QuantMap[4];
507 TW_UINT16 HuffmanMap[4];
515 TW_UINT32 ImageCount;
516 TW_UINT32 SheetCount;
528 TW_UINT16 PaletteType;
535 TW_UINT32 CommandBytes;
539 TW_UINT32 DataBytesXfered;
548 #if defined(__APPLE__)
563 TW_UINT32 DefaultValue;
564 TW_UINT32 CurrentValue;
581 TW_UINT32 MinBufSize;
582 TW_UINT32 MaxBufSize;
588 TW_UINT16 ConditionCode;
599 TW_HANDLE UTF8string;
604 TW_UINT16 CommunicationManager;
608 TW_UINT32 ReceiveSize;
624 #define TWON_ENUMERATION 4
625 #define TWON_ONEVALUE 5
628 #define TWON_ICONID 962
629 #define TWON_DSMID 461
630 #define TWON_DSMCODEID 63
632 #define TWON_DONTCARE8 0xff
633 #define TWON_DONTCARE16 0xffff
634 #define TWON_DONTCARE32 0xffffffff
637 #define TWMF_APPOWNS 0x0001
638 #define TWMF_DSMOWNS 0x0002
639 #define TWMF_DSOWNS 0x0004
640 #define TWMF_POINTER 0x0008
641 #define TWMF_HANDLE 0x0010
643 #define TWTY_INT8 0x0000
644 #define TWTY_INT16 0x0001
645 #define TWTY_INT32 0x0002
647 #define TWTY_UINT8 0x0003
648 #define TWTY_UINT16 0x0004
649 #define TWTY_UINT32 0x0005
651 #define TWTY_BOOL 0x0006
653 #define TWTY_FIX32 0x0007
655 #define TWTY_FRAME 0x0008
657 #define TWTY_STR32 0x0009
658 #define TWTY_STR64 0x000a
659 #define TWTY_STR128 0x000b
660 #define TWTY_STR255 0x000c
661 #define TWTY_HANDLE 0x000f
670 #define TWAL_FEEDERERROR 1
671 #define TWAL_FEEDERWARNING 2
672 #define TWAL_BARCODE 3
673 #define TWAL_DOUBLEFEED 4
675 #define TWAL_PATCHCODE 6
682 #define TWAS_CURRENT 2
685 #define TWBCOR_ROT0 0
686 #define TWBCOR_ROT90 1
687 #define TWBCOR_ROT180 2
688 #define TWBCOR_ROT270 3
689 #define TWBCOR_ROTX 4
694 #define TWBD_HORZVERT 2
695 #define TWBD_VERTHORZ 3
698 #define TWBO_LSBFIRST 0
699 #define TWBO_MSBFIRST 1
702 #define TWBP_DISABLE -2
706 #define TWBR_THRESHOLD 0
707 #define TWBR_HALFTONE 1
708 #define TWBR_CUSTHALFTONE 2
709 #define TWBR_DIFFUSION 3
710 #define TWBR_DYNAMICTHRESHOLD 4
714 #define TWBT_2OF5INTERLEAVED 1
715 #define TWBT_2OF5NONINTERLEAVED 2
716 #define TWBT_CODE93 3
717 #define TWBT_CODE128 4
718 #define TWBT_UCC128 5
719 #define TWBT_CODABAR 6
723 #define TWBT_EAN13 10
724 #define TWBT_POSTNET 11
725 #define TWBT_PDF417 12
726 #define TWBT_2OF5INDUSTRIAL 13
727 #define TWBT_2OF5MATRIX 14
728 #define TWBT_2OF5DATALOGIC 15
729 #define TWBT_2OF5IATA 16
730 #define TWBT_3OF9FULLASCII 17
731 #define TWBT_CODABARWITHSTARTSTOP 18
732 #define TWBT_MAXICODE 19
733 #define TWBT_QRCODE 20
737 #define TWCP_PACKBITS 1
738 #define TWCP_GROUP31D 2
739 #define TWCP_GROUP31DEOL 3
740 #define TWCP_GROUP32D 4
741 #define TWCP_GROUP4 5
748 #define TWCP_BITFIELDS 12
750 #define TWCP_JPEG2000 14
755 #define TWCS_BOTTOM 2
758 #define TWDE_CUSTOMEVENTS 0x8000
759 #define TWDE_CHECKAUTOMATICCAPTURE 0
760 #define TWDE_CHECKBATTERY 1
761 #define TWDE_CHECKDEVICEONLINE 2
762 #define TWDE_CHECKFLASH 3
763 #define TWDE_CHECKPOWERSUPPLY 4
764 #define TWDE_CHECKRESOLUTION 5
765 #define TWDE_DEVICEADDED 6
766 #define TWDE_DEVICEOFFLINE 7
767 #define TWDE_DEVICEREADY 8
768 #define TWDE_DEVICEREMOVED 9
769 #define TWDE_IMAGECAPTURED 10
770 #define TWDE_IMAGEDELETED 11
771 #define TWDE_PAPERDOUBLEFEED 12
772 #define TWDE_PAPERJAM 13
773 #define TWDE_LAMPFAILURE 14
774 #define TWDE_POWERSAVE 15
775 #define TWDE_POWERSAVENOTIFY 16
782 #define TWDSK_SUCCESS 0
783 #define TWDSK_REPORTONLY 1
785 #define TWDSK_DISABLED 3
789 #define TWDX_1PASSDUPLEX 1
790 #define TWDX_2PASSDUPLEX 2
795 #define TWFA_CENTER 2
799 #define TWFE_GENERAL 0
809 #define TWFF_TIFFMULTI 6
816 #define TWFF_DEJAVU 14
818 #define TWFF_PDFA2 16
819 #define TWFF_PDFRASTER 17
826 #define TWFL_REDEYE 4
829 #define TWFO_FIRSTPAGEFIRST 0
830 #define TWFO_LASTPAGEFIRST 1
833 #define TWFP_POCKETERROR 0
834 #define TWFP_POCKET1 1
835 #define TWFP_POCKET2 2
836 #define TWFP_POCKET3 3
837 #define TWFP_POCKET4 4
838 #define TWFP_POCKET5 5
839 #define TWFP_POCKET6 6
840 #define TWFP_POCKET7 7
841 #define TWFP_POCKET8 8
842 #define TWFP_POCKET9 9
843 #define TWFP_POCKET10 10
844 #define TWFP_POCKET11 11
845 #define TWFP_POCKET12 12
846 #define TWFP_POCKET13 13
847 #define TWFP_POCKET14 14
848 #define TWFP_POCKET15 15
849 #define TWFP_POCKET16 16
853 #define TWFR_FANFOLD 1
862 #define TWFT_MAGENTA 6
863 #define TWFT_YELLOW 7
867 #define TWFY_CAMERA 0
868 #define TWFY_CAMERATOP 1
869 #define TWFY_CAMERABOTTOM 2
870 #define TWFY_CAMERAPREVIEW 3
871 #define TWFY_DOMAIN 4
873 #define TWFY_DIRECTORY 6
875 #define TWFY_UNKNOWN 8
885 #define TWIF_LOWPASS 2
886 #define TWIF_BANDPASS 3
887 #define TWIF_HIGHPASS 4
888 #define TWIF_TEXT TWIF_BANDPASS
889 #define TWIF_FINELINE TWIF_HIGHPASS
893 #define TWIM_FRONTONTOP 1
894 #define TWIM_FRONTONBOTTOM 2
895 #define TWIM_FRONTONLEFT 3
896 #define TWIM_FRONTONRIGHT 4
906 #define TWJQ_UNKNOWN -4
908 #define TWJQ_MEDIUM -2
912 #define TWLP_REFLECTIVE 0
913 #define TWLP_TRANSMISSIVE 1
927 #define TWMD_INVALID 2
932 #define TWNF_LONEPIXEL 2
933 #define TWNF_MAJORITYRULE 3
938 #define TWOR_ROT180 2
939 #define TWOR_ROT270 3
940 #define TWOR_PORTRAIT TWOR_ROT0
941 #define TWOR_LANDSCAPE TWOR_ROT270
943 #define TWOR_AUTOTEXT 5
944 #define TWOR_AUTOPICTURE 6
949 #define TWOV_TOPBOTTOM 2
950 #define TWOV_LEFTRIGHT 3
959 #define TWPC_CHUNKY 0
960 #define TWPC_PLANAR 1
963 #define TWPCH_PATCH1 0
964 #define TWPCH_PATCH2 1
965 #define TWPCH_PATCH3 2
966 #define TWPCH_PATCH4 3
967 #define TWPCH_PATCH6 4
968 #define TWPCH_PATCHT 5
971 #define TWPF_CHOCOLATE 0
972 #define TWPF_VANILLA 1
975 #define TWPM_SINGLESTRING 0
976 #define TWPM_MULTISTRING 1
977 #define TWPM_COMPOUNDSTRING 2
980 #define TWPR_IMPRINTERTOPBEFORE 0
981 #define TWPR_IMPRINTERTOPAFTER 1
982 #define TWPR_IMPRINTERBOTTOMBEFORE 2
983 #define TWPR_IMPRINTERBOTTOMAFTER 3
984 #define TWPR_ENDORSERTOPBEFORE 4
985 #define TWPR_ENDORSERTOPAFTER 5
986 #define TWPR_ENDORSERBOTTOMBEFORE 6
987 #define TWPR_ENDORSERBOTTOMAFTER 7
990 #define TWPF_NORMAL 0
992 #define TWPF_ITALIC 2
993 #define TWPF_LARGESIZE 3
994 #define TWPF_SMALLSIZE 4
998 #define TWCT_PATCH1 1
999 #define TWCT_PATCH2 2
1000 #define TWCT_PATCH3 3
1001 #define TWCT_PATCH4 4
1002 #define TWCT_PATCHT 5
1003 #define TWCT_PATCH6 6
1006 #define TWPS_EXTERNAL 0
1007 #define TWPS_BATTERY 1
1013 #define TWPT_PALETTE 3
1018 #define TWPT_CIEXYZ 8
1020 #define TWPT_SRGB 10
1021 #define TWPT_SCRGB 11
1022 #define TWPT_INFRARED 16
1027 #define TWSG_MANUAL 2
1030 #define TWFM_POSITIVE 0
1031 #define TWFM_NEGATIVE 1
1034 #define TWDF_ULTRASONIC 0
1035 #define TWDF_BYLENGTH 1
1036 #define TWDF_INFRARED 2
1040 #define TWUS_MEDIUM 1
1045 #define TWDP_STOPANDWAIT 1
1046 #define TWDP_SOUND 2
1047 #define TWDP_DONOTIMPRINT 3
1051 #define TWMR_VERTICAL 1
1052 #define TWMR_HORIZONTAL 2
1055 #define TWJS_444YCBCR 0
1056 #define TWJS_444RGB 1
1065 #define TWPH_NORMAL 0
1066 #define TWPH_FRAGILE 1
1067 #define TWPH_THICK 2
1068 #define TWPH_TRIFOLD 3
1069 #define TWPH_PHOTOGRAPH 4
1073 #define TWCI_WARNING 1
1074 #define TWCI_ERROR 2
1075 #define TWCI_WARMUP 3
1080 #define TWSS_JISB5 2
1081 #define TWSS_USLETTER 3
1082 #define TWSS_USLEGAL 4
1084 #define TWSS_ISOB4 6
1085 #define TWSS_ISOB6 7
1086 #define TWSS_USLEDGER 9
1087 #define TWSS_USEXECUTIVE 10
1089 #define TWSS_ISOB3 12
1103 #define TWSS_ISOB0 26
1104 #define TWSS_ISOB1 27
1105 #define TWSS_ISOB2 28
1106 #define TWSS_ISOB5 29
1107 #define TWSS_ISOB7 30
1108 #define TWSS_ISOB8 31
1109 #define TWSS_ISOB9 32
1110 #define TWSS_ISOB10 33
1111 #define TWSS_JISB0 34
1112 #define TWSS_JISB1 35
1113 #define TWSS_JISB2 36
1114 #define TWSS_JISB3 37
1115 #define TWSS_JISB4 38
1116 #define TWSS_JISB6 39
1117 #define TWSS_JISB7 40
1118 #define TWSS_JISB8 41
1119 #define TWSS_JISB9 42
1120 #define TWSS_JISB10 43
1129 #define TWSS_USSTATEMENT 52
1130 #define TWSS_BUSINESSCARD 53
1131 #define TWSS_MAXSIZE 54
1134 #define TWSX_NATIVE 0
1136 #define TWSX_MEMORY 2
1137 #define TWSX_MEMFILE 4
1140 #define TWUN_INCHES 0
1141 #define TWUN_CENTIMETERS 1
1142 #define TWUN_PICAS 2
1143 #define TWUN_POINTS 3
1144 #define TWUN_TWIPS 4
1145 #define TWUN_PIXELS 5
1146 #define TWUN_MILLIMETERS 6
1153 #define TWCY_AFGHANISTAN 1001
1154 #define TWCY_ALGERIA 213
1155 #define TWCY_AMERICANSAMOA 684
1156 #define TWCY_ANDORRA 33
1157 #define TWCY_ANGOLA 1002
1158 #define TWCY_ANGUILLA 8090
1159 #define TWCY_ANTIGUA 8091
1160 #define TWCY_ARGENTINA 54
1161 #define TWCY_ARUBA 297
1162 #define TWCY_ASCENSIONI 247
1163 #define TWCY_AUSTRALIA 61
1164 #define TWCY_AUSTRIA 43
1165 #define TWCY_BAHAMAS 8092
1166 #define TWCY_BAHRAIN 973
1167 #define TWCY_BANGLADESH 880
1168 #define TWCY_BARBADOS 8093
1169 #define TWCY_BELGIUM 32
1170 #define TWCY_BELIZE 501
1171 #define TWCY_BENIN 229
1172 #define TWCY_BERMUDA 8094
1173 #define TWCY_BHUTAN 1003
1174 #define TWCY_BOLIVIA 591
1175 #define TWCY_BOTSWANA 267
1176 #define TWCY_BRITAIN 6
1177 #define TWCY_BRITVIRGINIS 8095
1178 #define TWCY_BRAZIL 55
1179 #define TWCY_BRUNEI 673
1180 #define TWCY_BULGARIA 359
1181 #define TWCY_BURKINAFASO 1004
1182 #define TWCY_BURMA 1005
1183 #define TWCY_BURUNDI 1006
1184 #define TWCY_CAMAROON 237
1185 #define TWCY_CANADA 2
1186 #define TWCY_CAPEVERDEIS 238
1187 #define TWCY_CAYMANIS 8096
1188 #define TWCY_CENTRALAFREP 1007
1189 #define TWCY_CHAD 1008
1190 #define TWCY_CHILE 56
1191 #define TWCY_CHINA 86
1192 #define TWCY_CHRISTMASIS 1009
1193 #define TWCY_COCOSIS 1009
1194 #define TWCY_COLOMBIA 57
1195 #define TWCY_COMOROS 1010
1196 #define TWCY_CONGO 1011
1197 #define TWCY_COOKIS 1012
1198 #define TWCY_COSTARICA 506
1200 #define TWCY_CYPRUS 357
1201 #define TWCY_CZECHOSLOVAKIA 42
1202 #define TWCY_DENMARK 45
1203 #define TWCY_DJIBOUTI 1013
1204 #define TWCY_DOMINICA 8097
1205 #define TWCY_DOMINCANREP 8098
1206 #define TWCY_EASTERIS 1014
1207 #define TWCY_ECUADOR 593
1208 #define TWCY_EGYPT 20
1209 #define TWCY_ELSALVADOR 503
1210 #define TWCY_EQGUINEA 1015
1211 #define TWCY_ETHIOPIA 251
1212 #define TWCY_FALKLANDIS 1016
1213 #define TWCY_FAEROEIS 298
1214 #define TWCY_FIJIISLANDS 679
1215 #define TWCY_FINLAND 358
1216 #define TWCY_FRANCE 33
1217 #define TWCY_FRANTILLES 596
1218 #define TWCY_FRGUIANA 594
1219 #define TWCY_FRPOLYNEISA 689
1220 #define TWCY_FUTANAIS 1043
1221 #define TWCY_GABON 241
1222 #define TWCY_GAMBIA 220
1223 #define TWCY_GERMANY 49
1224 #define TWCY_GHANA 233
1225 #define TWCY_GIBRALTER 350
1226 #define TWCY_GREECE 30
1227 #define TWCY_GREENLAND 299
1228 #define TWCY_GRENADA 8099
1229 #define TWCY_GRENEDINES 8015
1230 #define TWCY_GUADELOUPE 590
1231 #define TWCY_GUAM 671
1232 #define TWCY_GUANTANAMOBAY 5399
1233 #define TWCY_GUATEMALA 502
1234 #define TWCY_GUINEA 224
1235 #define TWCY_GUINEABISSAU 1017
1236 #define TWCY_GUYANA 592
1237 #define TWCY_HAITI 509
1238 #define TWCY_HONDURAS 504
1239 #define TWCY_HONGKONG 852
1240 #define TWCY_HUNGARY 36
1241 #define TWCY_ICELAND 354
1242 #define TWCY_INDIA 91
1243 #define TWCY_INDONESIA 62
1244 #define TWCY_IRAN 98
1245 #define TWCY_IRAQ 964
1246 #define TWCY_IRELAND 353
1247 #define TWCY_ISRAEL 972
1248 #define TWCY_ITALY 39
1249 #define TWCY_IVORYCOAST 225
1250 #define TWCY_JAMAICA 8010
1251 #define TWCY_JAPAN 81
1252 #define TWCY_JORDAN 962
1253 #define TWCY_KENYA 254
1254 #define TWCY_KIRIBATI 1018
1255 #define TWCY_KOREA 82
1256 #define TWCY_KUWAIT 965
1257 #define TWCY_LAOS 1019
1258 #define TWCY_LEBANON 1020
1259 #define TWCY_LIBERIA 231
1260 #define TWCY_LIBYA 218
1261 #define TWCY_LIECHTENSTEIN 41
1262 #define TWCY_LUXENBOURG 352
1263 #define TWCY_MACAO 853
1264 #define TWCY_MADAGASCAR 1021
1265 #define TWCY_MALAWI 265
1266 #define TWCY_MALAYSIA 60
1267 #define TWCY_MALDIVES 960
1268 #define TWCY_MALI 1022
1269 #define TWCY_MALTA 356
1270 #define TWCY_MARSHALLIS 692
1271 #define TWCY_MAURITANIA 1023
1272 #define TWCY_MAURITIUS 230
1273 #define TWCY_MEXICO 3
1274 #define TWCY_MICRONESIA 691
1275 #define TWCY_MIQUELON 508
1276 #define TWCY_MONACO 33
1277 #define TWCY_MONGOLIA 1024
1278 #define TWCY_MONTSERRAT 8011
1279 #define TWCY_MOROCCO 212
1280 #define TWCY_MOZAMBIQUE 1025
1281 #define TWCY_NAMIBIA 264
1282 #define TWCY_NAURU 1026
1283 #define TWCY_NEPAL 977
1284 #define TWCY_NETHERLANDS 31
1285 #define TWCY_NETHANTILLES 599
1286 #define TWCY_NEVIS 8012
1287 #define TWCY_NEWCALEDONIA 687
1288 #define TWCY_NEWZEALAND 64
1289 #define TWCY_NICARAGUA 505
1290 #define TWCY_NIGER 227
1291 #define TWCY_NIGERIA 234
1292 #define TWCY_NIUE 1027
1293 #define TWCY_NORFOLKI 1028
1294 #define TWCY_NORWAY 47
1295 #define TWCY_OMAN 968
1296 #define TWCY_PAKISTAN 92
1297 #define TWCY_PALAU 1029
1298 #define TWCY_PANAMA 507
1299 #define TWCY_PARAGUAY 595
1300 #define TWCY_PERU 51
1301 #define TWCY_PHILLIPPINES 63
1302 #define TWCY_PITCAIRNIS 1030
1303 #define TWCY_PNEWGUINEA 675
1304 #define TWCY_POLAND 48
1305 #define TWCY_PORTUGAL 351
1306 #define TWCY_QATAR 974
1307 #define TWCY_REUNIONI 1031
1308 #define TWCY_ROMANIA 40
1309 #define TWCY_RWANDA 250
1310 #define TWCY_SAIPAN 670
1311 #define TWCY_SANMARINO 39
1312 #define TWCY_SAOTOME 1033
1313 #define TWCY_SAUDIARABIA 966
1314 #define TWCY_SENEGAL 221
1315 #define TWCY_SEYCHELLESIS 1034
1316 #define TWCY_SIERRALEONE 1035
1317 #define TWCY_SINGAPORE 65
1318 #define TWCY_SOLOMONIS 1036
1319 #define TWCY_SOMALI 1037
1320 #define TWCY_SOUTHAFRICA 27
1321 #define TWCY_SPAIN 34
1322 #define TWCY_SRILANKA 94
1323 #define TWCY_STHELENA 1032
1324 #define TWCY_STKITTS 8013
1325 #define TWCY_STLUCIA 8014
1326 #define TWCY_STPIERRE 508
1327 #define TWCY_STVINCENT 8015
1328 #define TWCY_SUDAN 1038
1329 #define TWCY_SURINAME 597
1330 #define TWCY_SWAZILAND 268
1331 #define TWCY_SWEDEN 46
1332 #define TWCY_SWITZERLAND 41
1333 #define TWCY_SYRIA 1039
1334 #define TWCY_TAIWAN 886
1335 #define TWCY_TANZANIA 255
1336 #define TWCY_THAILAND 66
1337 #define TWCY_TOBAGO 8016
1338 #define TWCY_TOGO 228
1339 #define TWCY_TONGAIS 676
1340 #define TWCY_TRINIDAD 8016
1341 #define TWCY_TUNISIA 216
1342 #define TWCY_TURKEY 90
1343 #define TWCY_TURKSCAICOS 8017
1344 #define TWCY_TUVALU 1040
1345 #define TWCY_UGANDA 256
1347 #define TWCY_UAEMIRATES 971
1348 #define TWCY_UNITEDKINGDOM 44
1350 #define TWCY_URUGUAY 598
1351 #define TWCY_VANUATU 1041
1352 #define TWCY_VATICANCITY 39
1353 #define TWCY_VENEZUELA 58
1354 #define TWCY_WAKE 1042
1355 #define TWCY_WALLISIS 1043
1356 #define TWCY_WESTERNSAHARA 1044
1357 #define TWCY_WESTERNSAMOA 1045
1358 #define TWCY_YEMEN 1046
1359 #define TWCY_YUGOSLAVIA 38
1360 #define TWCY_ZAIRE 243
1361 #define TWCY_ZAMBIA 260
1362 #define TWCY_ZIMBABWE 263
1363 #define TWCY_ALBANIA 355
1364 #define TWCY_ARMENIA 374
1365 #define TWCY_AZERBAIJAN 994
1366 #define TWCY_BELARUS 375
1367 #define TWCY_BOSNIAHERZGO 387
1368 #define TWCY_CAMBODIA 855
1369 #define TWCY_CROATIA 385
1370 #define TWCY_CZECHREPUBLIC 420
1371 #define TWCY_DIEGOGARCIA 246
1372 #define TWCY_ERITREA 291
1373 #define TWCY_ESTONIA 372
1374 #define TWCY_GEORGIA 995
1375 #define TWCY_LATVIA 371
1376 #define TWCY_LESOTHO 266
1377 #define TWCY_LITHUANIA 370
1378 #define TWCY_MACEDONIA 389
1379 #define TWCY_MAYOTTEIS 269
1380 #define TWCY_MOLDOVA 373
1381 #define TWCY_MYANMAR 95
1382 #define TWCY_NORTHKOREA 850
1383 #define TWCY_PUERTORICO 787
1384 #define TWCY_RUSSIA 7
1385 #define TWCY_SERBIA 381
1386 #define TWCY_SLOVAKIA 421
1387 #define TWCY_SLOVENIA 386
1388 #define TWCY_SOUTHKOREA 82
1389 #define TWCY_UKRAINE 380
1390 #define TWCY_USVIRGINIS 340
1391 #define TWCY_VIETNAM 84
1396 #define TWLG_USERLOCALE -1
1411 #define TWLG_AFRIKAANS 14
1412 #define TWLG_ALBANIA 15
1413 #define TWLG_ARABIC 16
1414 #define TWLG_ARABIC_ALGERIA 17
1415 #define TWLG_ARABIC_BAHRAIN 18
1416 #define TWLG_ARABIC_EGYPT 19
1417 #define TWLG_ARABIC_IRAQ 20
1418 #define TWLG_ARABIC_JORDAN 21
1419 #define TWLG_ARABIC_KUWAIT 22
1420 #define TWLG_ARABIC_LEBANON 23
1421 #define TWLG_ARABIC_LIBYA 24
1422 #define TWLG_ARABIC_MOROCCO 25
1423 #define TWLG_ARABIC_OMAN 26
1424 #define TWLG_ARABIC_QATAR 27
1425 #define TWLG_ARABIC_SAUDIARABIA 28
1426 #define TWLG_ARABIC_SYRIA 29
1427 #define TWLG_ARABIC_TUNISIA 30
1428 #define TWLG_ARABIC_UAE 31
1429 #define TWLG_ARABIC_YEMEN 32
1430 #define TWLG_BASQUE 33
1431 #define TWLG_BYELORUSSIAN 34
1432 #define TWLG_BULGARIAN 35
1433 #define TWLG_CATALAN 36
1434 #define TWLG_CHINESE 37
1435 #define TWLG_CHINESE_HONGKONG 38
1436 #define TWLG_CHINESE_PRC 39
1437 #define TWLG_CHINESE_SINGAPORE 40
1438 #define TWLG_CHINESE_SIMPLIFIED 41
1439 #define TWLG_CHINESE_TAIWAN 42
1440 #define TWLG_CHINESE_TRADITIONAL 43
1441 #define TWLG_CROATIA 44
1442 #define TWLG_CZECH 45
1443 #define TWLG_DANISH TWLG_DAN
1444 #define TWLG_DUTCH TWLG_DUT
1445 #define TWLG_DUTCH_BELGIAN 46
1446 #define TWLG_ENGLISH TWLG_ENG
1447 #define TWLG_ENGLISH_AUSTRALIAN 47
1448 #define TWLG_ENGLISH_CANADIAN 48
1449 #define TWLG_ENGLISH_IRELAND 49
1450 #define TWLG_ENGLISH_NEWZEALAND 50
1451 #define TWLG_ENGLISH_SOUTHAFRICA 51
1452 #define TWLG_ENGLISH_UK 52
1453 #define TWLG_ENGLISH_USA TWLG_USA
1454 #define TWLG_ESTONIAN 53
1455 #define TWLG_FAEROESE 54
1456 #define TWLG_FARSI 55
1457 #define TWLG_FINNISH TWLG_FIN
1458 #define TWLG_FRENCH TWLG_FRN
1459 #define TWLG_FRENCH_BELGIAN 56
1460 #define TWLG_FRENCH_CANADIAN TWLG_FCF
1461 #define TWLG_FRENCH_LUXEMBOURG 57
1462 #define TWLG_FRENCH_SWISS 58
1463 #define TWLG_GERMAN TWLG_GER
1464 #define TWLG_GERMAN_AUSTRIAN 59
1465 #define TWLG_GERMAN_LUXEMBOURG 60
1466 #define TWLG_GERMAN_LIECHTENSTEIN 61
1467 #define TWLG_GERMAN_SWISS 62
1468 #define TWLG_GREEK 63
1469 #define TWLG_HEBREW 64
1470 #define TWLG_HUNGARIAN 65
1471 #define TWLG_ICELANDIC TWLG_ICE
1472 #define TWLG_INDONESIAN 66
1473 #define TWLG_ITALIAN TWLG_ITN
1474 #define TWLG_ITALIAN_SWISS 67
1475 #define TWLG_JAPANESE 68
1476 #define TWLG_KOREAN 69
1477 #define TWLG_KOREAN_JOHAB 70
1478 #define TWLG_LATVIAN 71
1479 #define TWLG_LITHUANIAN 72
1480 #define TWLG_NORWEGIAN TWLG_NOR
1481 #define TWLG_NORWEGIAN_BOKMAL 73
1482 #define TWLG_NORWEGIAN_NYNORSK 74
1483 #define TWLG_POLISH 75
1484 #define TWLG_PORTUGUESE TWLG_POR
1485 #define TWLG_PORTUGUESE_BRAZIL 76
1486 #define TWLG_ROMANIAN 77
1487 #define TWLG_RUSSIAN 78
1488 #define TWLG_SERBIAN_LATIN 79
1489 #define TWLG_SLOVAK 80
1490 #define TWLG_SLOVENIAN 81
1491 #define TWLG_SPANISH TWLG_SPA
1492 #define TWLG_SPANISH_MEXICAN 82
1493 #define TWLG_SPANISH_MODERN 83
1494 #define TWLG_SWEDISH TWLG_SWE
1495 #define TWLG_THAI 84
1496 #define TWLG_TURKISH 85
1497 #define TWLG_UKRANIAN 86
1498 #define TWLG_ASSAMESE 87
1499 #define TWLG_BENGALI 88
1500 #define TWLG_BIHARI 89
1501 #define TWLG_BODO 90
1502 #define TWLG_DOGRI 91
1503 #define TWLG_GUJARATI 92
1504 #define TWLG_HARYANVI 93
1505 #define TWLG_HINDI 94
1506 #define TWLG_KANNADA 95
1507 #define TWLG_KASHMIRI 96
1508 #define TWLG_MALAYALAM 97
1509 #define TWLG_MARATHI 98
1510 #define TWLG_MARWARI 99
1511 #define TWLG_MEGHALAYAN 100
1512 #define TWLG_MIZO 101
1513 #define TWLG_NAGA 102
1514 #define TWLG_ORISSI 103
1515 #define TWLG_PUNJABI 104
1516 #define TWLG_PUSHTU 105
1517 #define TWLG_SERBIAN_CYRILLIC 106
1518 #define TWLG_SIKKIMI 107
1519 #define TWLG_SWEDISH_FINLAND 108
1520 #define TWLG_TAMIL 109
1521 #define TWLG_TELUGU 110
1522 #define TWLG_TRIPURI 111
1523 #define TWLG_URDU 112
1524 #define TWLG_VIETNAMESE 113
1530 #define DG_CONTROL 0x0001L
1531 #define DG_IMAGE 0x0002L
1532 #define DG_AUDIO 0x0004L
1540 #define DF_DSM2 0x10000000L
1541 #define DF_APP2 0x20000000L
1543 #define DF_DS2 0x40000000L
1545 #define DG_MASK 0xFFFFL
1550 #define DAT_NULL 0x0000
1551 #define DAT_CUSTOMBASE 0x8000
1554 #define DAT_CAPABILITY 0x0001
1555 #define DAT_EVENT 0x0002
1556 #define DAT_IDENTITY 0x0003
1557 #define DAT_PARENT 0x0004
1558 #define DAT_PENDINGXFERS 0x0005
1559 #define DAT_SETUPMEMXFER 0x0006
1560 #define DAT_SETUPFILEXFER 0x0007
1561 #define DAT_STATUS 0x0008
1562 #define DAT_USERINTERFACE 0x0009
1563 #define DAT_XFERGROUP 0x000a
1564 #define DAT_CUSTOMDSDATA 0x000c
1565 #define DAT_DEVICEEVENT 0x000d
1566 #define DAT_FILESYSTEM 0x000e
1567 #define DAT_PASSTHRU 0x000f
1568 #define DAT_CALLBACK 0x0010
1569 #define DAT_STATUSUTF8 0x0011
1570 #define DAT_CALLBACK2 0x0012
1571 #define DAT_METRICS 0x0013
1572 #define DAT_TWAINDIRECT 0x0014
1575 #define DAT_IMAGEINFO 0x0101
1576 #define DAT_IMAGELAYOUT 0x0102
1577 #define DAT_IMAGEMEMXFER 0x0103
1578 #define DAT_IMAGENATIVEXFER 0x0104
1579 #define DAT_IMAGEFILEXFER 0x0105
1580 #define DAT_CIECOLOR 0x0106
1581 #define DAT_GRAYRESPONSE 0x0107
1582 #define DAT_RGBRESPONSE 0x0108
1583 #define DAT_JPEGCOMPRESSION 0x0109
1584 #define DAT_PALETTE8 0x010a
1585 #define DAT_EXTIMAGEINFO 0x010b
1586 #define DAT_FILTER 0x010c
1589 #define DAT_AUDIOFILEXFER 0x0201
1590 #define DAT_AUDIOINFO 0x0202
1591 #define DAT_AUDIONATIVEXFER 0x0203
1594 #define DAT_ICCPROFILE 0x0401
1595 #define DAT_IMAGEMEMFILEXFER 0x0402
1596 #define DAT_ENTRYPOINT 0x0403
1606 #define MSG_NULL 0x0000
1607 #define MSG_CUSTOMBASE 0x8000
1610 #define MSG_GET 0x0001
1611 #define MSG_GETCURRENT 0x0002
1612 #define MSG_GETDEFAULT 0x0003
1613 #define MSG_GETFIRST 0x0004
1614 #define MSG_GETNEXT 0x0005
1615 #define MSG_SET 0x0006
1616 #define MSG_RESET 0x0007
1617 #define MSG_QUERYSUPPORT 0x0008
1618 #define MSG_GETHELP 0x0009
1619 #define MSG_GETLABEL 0x000a
1620 #define MSG_GETLABELENUM 0x000b
1621 #define MSG_SETCONSTRAINT 0x000c
1624 #define MSG_XFERREADY 0x0101
1625 #define MSG_CLOSEDSREQ 0x0102
1626 #define MSG_CLOSEDSOK 0x0103
1627 #define MSG_DEVICEEVENT 0X0104
1630 #define MSG_OPENDSM 0x0301
1631 #define MSG_CLOSEDSM 0x0302
1634 #define MSG_OPENDS 0x0401
1635 #define MSG_CLOSEDS 0x0402
1636 #define MSG_USERSELECT 0x0403
1639 #define MSG_DISABLEDS 0x0501
1640 #define MSG_ENABLEDS 0x0502
1641 #define MSG_ENABLEDSUIONLY 0x0503
1644 #define MSG_PROCESSEVENT 0x0601
1647 #define MSG_ENDXFER 0x0701
1648 #define MSG_STOPFEEDER 0x0702
1651 #define MSG_CHANGEDIRECTORY 0x0801
1652 #define MSG_CREATEDIRECTORY 0x0802
1653 #define MSG_DELETE 0x0803
1654 #define MSG_FORMATMEDIA 0x0804
1655 #define MSG_GETCLOSE 0x0805
1656 #define MSG_GETFIRSTFILE 0x0806
1657 #define MSG_GETINFO 0x0807
1658 #define MSG_GETNEXTFILE 0x0808
1659 #define MSG_RENAME 0x0809
1660 #define MSG_COPY 0x080A
1661 #define MSG_AUTOMATICCAPTUREDIRECTORY 0x080B
1664 #define MSG_PASSTHRU 0x0901
1667 #define MSG_REGISTER_CALLBACK 0x0902
1670 #define MSG_RESETALL 0x0A01
1673 #define MSG_SETTASK 0x0B01
1679 #define CAP_CUSTOMBASE 0x8000
1682 #define CAP_XFERCOUNT 0x0001
1685 #define ICAP_COMPRESSION 0x0100
1686 #define ICAP_PIXELTYPE 0x0101
1687 #define ICAP_UNITS 0x0102
1688 #define ICAP_XFERMECH 0x0103
1691 #define CAP_AUTHOR 0x1000
1692 #define CAP_CAPTION 0x1001
1693 #define CAP_FEEDERENABLED 0x1002
1694 #define CAP_FEEDERLOADED 0x1003
1695 #define CAP_TIMEDATE 0x1004
1696 #define CAP_SUPPORTEDCAPS 0x1005
1697 #define CAP_EXTENDEDCAPS 0x1006
1698 #define CAP_AUTOFEED 0x1007
1699 #define CAP_CLEARPAGE 0x1008
1700 #define CAP_FEEDPAGE 0x1009
1701 #define CAP_REWINDPAGE 0x100a
1702 #define CAP_INDICATORS 0x100b
1703 #define CAP_PAPERDETECTABLE 0x100d
1704 #define CAP_UICONTROLLABLE 0x100e
1705 #define CAP_DEVICEONLINE 0x100f
1706 #define CAP_AUTOSCAN 0x1010
1707 #define CAP_THUMBNAILSENABLED 0x1011
1708 #define CAP_DUPLEX 0x1012
1709 #define CAP_DUPLEXENABLED 0x1013
1710 #define CAP_ENABLEDSUIONLY 0x1014
1711 #define CAP_CUSTOMDSDATA 0x1015
1712 #define CAP_ENDORSER 0x1016
1713 #define CAP_JOBCONTROL 0x1017
1714 #define CAP_ALARMS 0x1018
1715 #define CAP_ALARMVOLUME 0x1019
1716 #define CAP_AUTOMATICCAPTURE 0x101a
1717 #define CAP_TIMEBEFOREFIRSTCAPTURE 0x101b
1718 #define CAP_TIMEBETWEENCAPTURES 0x101c
1719 #define CAP_MAXBATCHBUFFERS 0x101e
1720 #define CAP_DEVICETIMEDATE 0x101f
1721 #define CAP_POWERSUPPLY 0x1020
1722 #define CAP_CAMERAPREVIEWUI 0x1021
1723 #define CAP_DEVICEEVENT 0x1022
1724 #define CAP_SERIALNUMBER 0x1024
1725 #define CAP_PRINTER 0x1026
1726 #define CAP_PRINTERENABLED 0x1027
1727 #define CAP_PRINTERINDEX 0x1028
1728 #define CAP_PRINTERMODE 0x1029
1729 #define CAP_PRINTERSTRING 0x102a
1730 #define CAP_PRINTERSUFFIX 0x102b
1731 #define CAP_LANGUAGE 0x102c
1732 #define CAP_FEEDERALIGNMENT 0x102d
1733 #define CAP_FEEDERORDER 0x102e
1734 #define CAP_REACQUIREALLOWED 0x1030
1735 #define CAP_BATTERYMINUTES 0x1032
1736 #define CAP_BATTERYPERCENTAGE 0x1033
1737 #define CAP_CAMERASIDE 0x1034
1738 #define CAP_SEGMENTED 0x1035
1739 #define CAP_CAMERAENABLED 0x1036
1740 #define CAP_CAMERAORDER 0x1037
1741 #define CAP_MICRENABLED 0x1038
1742 #define CAP_FEEDERPREP 0x1039
1743 #define CAP_FEEDERPOCKET 0x103a
1744 #define CAP_AUTOMATICSENSEMEDIUM 0x103b
1745 #define CAP_CUSTOMINTERFACEGUID 0x103c
1746 #define CAP_SUPPORTEDCAPSSEGMENTUNIQUE 0x103d
1747 #define CAP_SUPPORTEDDATS 0x103e
1748 #define CAP_DOUBLEFEEDDETECTION 0x103f
1749 #define CAP_DOUBLEFEEDDETECTIONLENGTH 0x1040
1750 #define CAP_DOUBLEFEEDDETECTIONSENSITIVITY 0x1041
1751 #define CAP_DOUBLEFEEDDETECTIONRESPONSE 0x1042
1752 #define CAP_PAPERHANDLING 0x1043
1753 #define CAP_INDICATORSMODE 0x1044
1754 #define CAP_PRINTERVERTICALOFFSET 0x1045
1755 #define CAP_POWERSAVETIME 0x1046
1756 #define CAP_PRINTERCHARROTATION 0x1047
1757 #define CAP_PRINTERFONTSTYLE 0x1048
1758 #define CAP_PRINTERINDEXLEADCHAR 0x1049
1759 #define CAP_PRINTERINDEXMAXVALUE 0x104A
1760 #define CAP_PRINTERINDEXNUMDIGITS 0x104B
1761 #define CAP_PRINTERINDEXSTEP 0x104C
1762 #define CAP_PRINTERINDEXTRIGGER 0x104D
1763 #define CAP_PRINTERSTRINGPREVIEW 0x104E
1764 #define CAP_SHEETCOUNT 0x104F
1769 #define ICAP_AUTOBRIGHT 0x1100
1770 #define ICAP_BRIGHTNESS 0x1101
1771 #define ICAP_CONTRAST 0x1103
1772 #define ICAP_CUSTHALFTONE 0x1104
1773 #define ICAP_EXPOSURETIME 0x1105
1774 #define ICAP_FILTER 0x1106
1775 #define ICAP_FLASHUSED 0x1107
1776 #define ICAP_GAMMA 0x1108
1777 #define ICAP_HALFTONES 0x1109
1778 #define ICAP_HIGHLIGHT 0x110a
1779 #define ICAP_IMAGEFILEFORMAT 0x110c
1780 #define ICAP_LAMPSTATE 0x110d
1781 #define ICAP_LIGHTSOURCE 0x110e
1782 #define ICAP_ORIENTATION 0x1110
1783 #define ICAP_PHYSICALWIDTH 0x1111
1784 #define ICAP_PHYSICALHEIGHT 0x1112
1785 #define ICAP_SHADOW 0x1113
1786 #define ICAP_FRAMES 0x1114
1787 #define ICAP_XNATIVERESOLUTION 0x1116
1788 #define ICAP_YNATIVERESOLUTION 0x1117
1789 #define ICAP_XRESOLUTION 0x1118
1790 #define ICAP_YRESOLUTION 0x1119
1791 #define ICAP_MAXFRAMES 0x111a
1792 #define ICAP_TILES 0x111b
1793 #define ICAP_BITORDER 0x111c
1794 #define ICAP_CCITTKFACTOR 0x111d
1795 #define ICAP_LIGHTPATH 0x111e
1796 #define ICAP_PIXELFLAVOR 0x111f
1797 #define ICAP_PLANARCHUNKY 0x1120
1798 #define ICAP_ROTATION 0x1121
1799 #define ICAP_SUPPORTEDSIZES 0x1122
1800 #define ICAP_THRESHOLD 0x1123
1801 #define ICAP_XSCALING 0x1124
1802 #define ICAP_YSCALING 0x1125
1803 #define ICAP_BITORDERCODES 0x1126
1804 #define ICAP_PIXELFLAVORCODES 0x1127
1805 #define ICAP_JPEGPIXELTYPE 0x1128
1806 #define ICAP_TIMEFILL 0x112a
1807 #define ICAP_BITDEPTH 0x112b
1808 #define ICAP_BITDEPTHREDUCTION 0x112c
1809 #define ICAP_UNDEFINEDIMAGESIZE 0x112d
1810 #define ICAP_IMAGEDATASET 0x112e
1811 #define ICAP_EXTIMAGEINFO 0x112f
1812 #define ICAP_MINIMUMHEIGHT 0x1130
1813 #define ICAP_MINIMUMWIDTH 0x1131
1814 #define ICAP_AUTODISCARDBLANKPAGES 0x1134
1815 #define ICAP_FLIPROTATION 0x1136
1816 #define ICAP_BARCODEDETECTIONENABLED 0x1137
1817 #define ICAP_SUPPORTEDBARCODETYPES 0x1138
1818 #define ICAP_BARCODEMAXSEARCHPRIORITIES 0x1139
1819 #define ICAP_BARCODESEARCHPRIORITIES 0x113a
1820 #define ICAP_BARCODESEARCHMODE 0x113b
1821 #define ICAP_BARCODEMAXRETRIES 0x113c
1822 #define ICAP_BARCODETIMEOUT 0x113d
1823 #define ICAP_ZOOMFACTOR 0x113e
1824 #define ICAP_PATCHCODEDETECTIONENABLED 0x113f
1825 #define ICAP_SUPPORTEDPATCHCODETYPES 0x1140
1826 #define ICAP_PATCHCODEMAXSEARCHPRIORITIES 0x1141
1827 #define ICAP_PATCHCODESEARCHPRIORITIES 0x1142
1828 #define ICAP_PATCHCODESEARCHMODE 0x1143
1829 #define ICAP_PATCHCODEMAXRETRIES 0x1144
1830 #define ICAP_PATCHCODETIMEOUT 0x1145
1831 #define ICAP_FLASHUSED2 0x1146
1832 #define ICAP_IMAGEFILTER 0x1147
1833 #define ICAP_NOISEFILTER 0x1148
1834 #define ICAP_OVERSCAN 0x1149
1835 #define ICAP_AUTOMATICBORDERDETECTION 0x1150
1836 #define ICAP_AUTOMATICDESKEW 0x1151
1837 #define ICAP_AUTOMATICROTATE 0x1152
1838 #define ICAP_JPEGQUALITY 0x1153
1839 #define ICAP_FEEDERTYPE 0x1154
1840 #define ICAP_ICCPROFILE 0x1155
1841 #define ICAP_AUTOSIZE 0x1156
1842 #define ICAP_AUTOMATICCROPUSESFRAME 0x1157
1843 #define ICAP_AUTOMATICLENGTHDETECTION 0x1158
1844 #define ICAP_AUTOMATICCOLORENABLED 0x1159
1845 #define ICAP_AUTOMATICCOLORNONCOLORPIXELTYPE 0x115a
1846 #define ICAP_COLORMANAGEMENTENABLED 0x115b
1847 #define ICAP_IMAGEMERGE 0x115c
1848 #define ICAP_IMAGEMERGEHEIGHTTHRESHOLD 0x115d
1849 #define ICAP_SUPPORTEDEXTIMAGEINFO 0x115e
1850 #define ICAP_FILMTYPE 0x115f
1851 #define ICAP_MIRROR 0x1160
1852 #define ICAP_JPEGSUBSAMPLING 0x1161
1855 #define ACAP_XFERMECH 0x1202
1862 #define TWEI_BARCODEX 0x1200
1863 #define TWEI_BARCODEY 0x1201
1864 #define TWEI_BARCODETEXT 0x1202
1865 #define TWEI_BARCODETYPE 0x1203
1866 #define TWEI_DESHADETOP 0x1204
1867 #define TWEI_DESHADELEFT 0x1205
1868 #define TWEI_DESHADEHEIGHT 0x1206
1869 #define TWEI_DESHADEWIDTH 0x1207
1870 #define TWEI_DESHADESIZE 0x1208
1871 #define TWEI_SPECKLESREMOVED 0x1209
1872 #define TWEI_HORZLINEXCOORD 0x120A
1873 #define TWEI_HORZLINEYCOORD 0x120B
1874 #define TWEI_HORZLINELENGTH 0x120C
1875 #define TWEI_HORZLINETHICKNESS 0x120D
1876 #define TWEI_VERTLINEXCOORD 0x120E
1877 #define TWEI_VERTLINEYCOORD 0x120F
1878 #define TWEI_VERTLINELENGTH 0x1210
1879 #define TWEI_VERTLINETHICKNESS 0x1211
1880 #define TWEI_PATCHCODE 0x1212
1881 #define TWEI_ENDORSEDTEXT 0x1213
1882 #define TWEI_FORMCONFIDENCE 0x1214
1883 #define TWEI_FORMTEMPLATEMATCH 0x1215
1884 #define TWEI_FORMTEMPLATEPAGEMATCH 0x1216
1885 #define TWEI_FORMHORZDOCOFFSET 0x1217
1886 #define TWEI_FORMVERTDOCOFFSET 0x1218
1887 #define TWEI_BARCODECOUNT 0x1219
1888 #define TWEI_BARCODECONFIDENCE 0x121A
1889 #define TWEI_BARCODEROTATION 0x121B
1890 #define TWEI_BARCODETEXTLENGTH 0x121C
1891 #define TWEI_DESHADECOUNT 0x121D
1892 #define TWEI_DESHADEBLACKCOUNTOLD 0x121E
1893 #define TWEI_DESHADEBLACKCOUNTNEW 0x121F
1894 #define TWEI_DESHADEBLACKRLMIN 0x1220
1895 #define TWEI_DESHADEBLACKRLMAX 0x1221
1896 #define TWEI_DESHADEWHITECOUNTOLD 0x1222
1897 #define TWEI_DESHADEWHITECOUNTNEW 0x1223
1898 #define TWEI_DESHADEWHITERLMIN 0x1224
1899 #define TWEI_DESHADEWHITERLAVE 0x1225
1900 #define TWEI_DESHADEWHITERLMAX 0x1226
1901 #define TWEI_BLACKSPECKLESREMOVED 0x1227
1902 #define TWEI_WHITESPECKLESREMOVED 0x1228
1903 #define TWEI_HORZLINECOUNT 0x1229
1904 #define TWEI_VERTLINECOUNT 0x122A
1905 #define TWEI_DESKEWSTATUS 0x122B
1906 #define TWEI_SKEWORIGINALANGLE 0x122C
1907 #define TWEI_SKEWFINALANGLE 0x122D
1908 #define TWEI_SKEWCONFIDENCE 0x122E
1909 #define TWEI_SKEWWINDOWX1 0x122F
1910 #define TWEI_SKEWWINDOWY1 0x1230
1911 #define TWEI_SKEWWINDOWX2 0x1231
1912 #define TWEI_SKEWWINDOWY2 0x1232
1913 #define TWEI_SKEWWINDOWX3 0x1233
1914 #define TWEI_SKEWWINDOWY3 0x1234
1915 #define TWEI_SKEWWINDOWX4 0x1235
1916 #define TWEI_SKEWWINDOWY4 0x1236
1917 #define TWEI_BOOKNAME 0x1238
1918 #define TWEI_CHAPTERNUMBER 0x1239
1919 #define TWEI_DOCUMENTNUMBER 0x123A
1920 #define TWEI_PAGENUMBER 0x123B
1921 #define TWEI_CAMERA 0x123C
1922 #define TWEI_FRAMENUMBER 0x123D
1923 #define TWEI_FRAME 0x123E
1924 #define TWEI_PIXELFLAVOR 0x123F
1925 #define TWEI_ICCPROFILE 0x1240
1926 #define TWEI_LASTSEGMENT 0x1241
1927 #define TWEI_SEGMENTNUMBER 0x1242
1928 #define TWEI_MAGDATA 0x1243
1929 #define TWEI_MAGTYPE 0x1244
1930 #define TWEI_PAGESIDE 0x1245
1931 #define TWEI_FILESYSTEMSOURCE 0x1246
1932 #define TWEI_IMAGEMERGED 0x1247
1933 #define TWEI_MAGDATALENGTH 0x1248
1934 #define TWEI_PAPERCOUNT 0x1249
1935 #define TWEI_PRINTERTEXT 0x124A
1936 #define TWEI_TWAINDIRECTMETADATA 0x124B
1938 #define TWEJ_NONE 0x0000
1939 #define TWEJ_MIDSEPARATOR 0x0001
1940 #define TWEJ_PATCH1 0x0002
1941 #define TWEJ_PATCH2 0x0003
1942 #define TWEJ_PATCH3 0x0004
1943 #define TWEJ_PATCH4 0x0005
1944 #define TWEJ_PATCH6 0x0006
1945 #define TWEJ_PATCHT 0x0007
1952 #define TWRC_CUSTOMBASE 0x8000
1954 #define TWRC_SUCCESS 0
1955 #define TWRC_FAILURE 1
1956 #define TWRC_CHECKSTATUS 2
1957 #define TWRC_CANCEL 3
1958 #define TWRC_DSEVENT 4
1959 #define TWRC_NOTDSEVENT 5
1960 #define TWRC_XFERDONE 6
1961 #define TWRC_ENDOFLIST 7
1962 #define TWRC_INFONOTSUPPORTED 8
1963 #define TWRC_DATANOTAVAILABLE 9
1964 #define TWRC_BUSY 10
1965 #define TWRC_SCANNERLOCKED 11
1968 #define TWCC_CUSTOMBASE 0x8000
1970 #define TWCC_SUCCESS 0
1971 #define TWCC_BUMMER 1
1972 #define TWCC_LOWMEMORY 2
1974 #define TWCC_MAXCONNECTIONS 4
1975 #define TWCC_OPERATIONERROR 5
1976 #define TWCC_BADCAP 6
1977 #define TWCC_BADPROTOCOL 9
1978 #define TWCC_BADVALUE 10
1979 #define TWCC_SEQERROR 11
1980 #define TWCC_BADDEST 12
1981 #define TWCC_CAPUNSUPPORTED 13
1982 #define TWCC_CAPBADOPERATION 14
1983 #define TWCC_CAPSEQERROR 15
1984 #define TWCC_DENIED 16
1985 #define TWCC_FILEEXISTS 17
1986 #define TWCC_FILENOTFOUND 18
1987 #define TWCC_NOTEMPTY 19
1988 #define TWCC_PAPERJAM 20
1989 #define TWCC_PAPERDOUBLEFEED 21
1990 #define TWCC_FILEWRITEERROR 22
1991 #define TWCC_CHECKDEVICEONLINE 23
1992 #define TWCC_INTERLOCK 24
1993 #define TWCC_DAMAGEDCORNER 25
1994 #define TWCC_FOCUSERROR 26
1995 #define TWCC_DOCTOOLIGHT 27
1996 #define TWCC_DOCTOODARK 28
1997 #define TWCC_NOMEDIA 29
2001 #define TWQC_GET 0x0001
2002 #define TWQC_SET 0x0002
2003 #define TWQC_GETDEFAULT 0x0004
2004 #define TWQC_GETCURRENT 0x0008
2005 #define TWQC_RESET 0x0010
2006 #define TWQC_SETCONSTRAINT 0x0020
2007 #define TWQC_GETHELP 0x0100
2008 #define TWQC_GETLABEL 0x0200
2009 #define TWQC_GETLABELENUM 0x0400
2014 #if defined(WIN32) || defined(WIN64)
2016 #elif !defined(TWH_CMP_GNU)
2017 #define TW_HUGE huge
2022 typedef BYTE TW_HUGE * HPBYTE;
2023 typedef void TW_HUGE * HPVOID;
2025 typedef unsigned char TW_STR1024[1026], FAR *pTW_STR1026, FAR *pTW_STR1024;
2026 typedef wchar_t TW_UNI512[512], FAR *pTW_UNI512;
2028 #define TWTY_STR1024 0x000d
2029 #define TWTY_UNI512 0x000e
2033 #define DAT_TWUNKIDENTITY 0x000b
2034 #define DAT_SETUPFILEXFER2 0x0301
2036 #define CAP_CLEARBUFFERS 0x101d
2037 #define CAP_SUPPORTEDCAPSEXT 0x100c
2038 #define CAP_FILESYSTEM //0x????
2039 #define CAP_PAGEMULTIPLEACQUIRE 0x1023
2040 #define CAP_PAPERBINDING 0x102f
2041 #define CAP_PASSTHRU 0x1031
2042 #define CAP_POWERDOWNTIME 0x1034
2043 #define ACAP_AUDIOFILEFORMAT 0x1201
2045 #define MSG_CHECKSTATUS 0x0201
2047 #define MSG_INVOKE_CALLBACK 0x0903
2049 #define TWQC_CONSTRAINABLE 0x0040
2051 #define TWSX_FILE2 3
2054 #define TWFS_FILESYSTEM 0
2055 #define TWFS_RECURSIVEDELETE 1
2058 #define TWPT_SRGB64 11
2060 #define TWPT_CIELAB 13
2061 #define TWPT_CIELUV 14
2062 #define TWPT_YCBCR 15
2066 #define TWSS_A4LETTER TWSS_A4
2067 #define TWSS_B3 TWSS_ISOB3
2068 #define TWSS_B4 TWSS_ISOB4
2069 #define TWSS_B6 TWSS_ISOB6
2070 #define TWSS_B5LETTER TWSS_JISB5
2080 #define TWCB_CLEAR 1
2081 #define TWCB_NOCLEAR 2
2086 TW_UINT16 FileNameType;
2105 TW_INT16 dataArgType;
2114 TW_UINT16 returnCode;
2115 TW_UINT16 conditionCode;
2123 TW_UINT16 Properties;
2142 #define TW_CALLINGSTYLE PASCAL
2144 #define TW_CALLINGSTYLE
2159 typedef TW_UINT16 (TW_CALLINGSTYLE *DSMENTRYPROC)(
pTW_IDENTITY pOrigin,
2179 TW_UINT16 TW_CALLINGSTYLE DS_Entry(
pTW_IDENTITY pOrigin,
2185 typedef TW_UINT16 (FAR PASCAL *DSENTRYPROC)(
pTW_IDENTITY pOrigin,
2191 TW_UINT16 TW_CALLINGSTYLE TWAIN_Callback(
pTW_IDENTITY pOrigin,
2197 typedef TW_UINT16 (TW_CALLINGSTYLE *TWAINCALLBACKPROC)(
pTW_IDENTITY pOrigin,
2204 TW_HANDLE TW_CALLINGSTYLE DSM_MemAllocate (TW_UINT32);
2205 typedef TW_HANDLE (TW_CALLINGSTYLE *DSM_MEMALLOCATE)(TW_UINT32 _size);
2207 void TW_CALLINGSTYLE DSM_MemFree (TW_HANDLE);
2208 typedef void (TW_CALLINGSTYLE *DSM_MEMFREE)(TW_HANDLE _handle);
2210 TW_MEMREF TW_CALLINGSTYLE DSM_MemLock (TW_HANDLE);
2211 typedef TW_MEMREF (TW_CALLINGSTYLE *DSM_MEMLOCK)(TW_HANDLE _handle);
2213 void TW_CALLINGSTYLE DSM_MemUnlock (TW_HANDLE);
2214 typedef void (TW_CALLINGSTYLE *DSM_MEMUNLOCK)(TW_HANDLE _handle);
2224 DSM_MEMALLOCATE DSM_MemAllocate;
2225 DSM_MEMFREE DSM_MemFree;
2226 DSM_MEMLOCK DSM_MemLock;
2227 DSM_MEMUNLOCK DSM_MemUnlock;
2235 TW_UINT32 SaturationStart;
2236 TW_UINT32 SaturationEnd;
2237 TW_UINT32 ValueStart;
2239 TW_UINT32 Replacement;
2245 TW_UINT32 DescriptorCount;
2246 TW_UINT32 MaxDescriptorCount;
2247 TW_UINT32 Condition;
2248 TW_HANDLE hDescriptors;
2254 #pragma pack (pop, before_twain)
2255 #elif defined(TWH_CMP_GNU)
2256 #if defined(__APPLE__)
2257 #pragma options align = reset
2259 #pragma pack (pop, before_twain)
2261 #elif defined(TWH_CMP_BORLAND)