{* This file is part of the Dynarithmic TWAIN Library (DTWAIN).                          *}
{* Copyright (c) 2002-2026 Dynarithmic Software.                                         *}
{*                                                                                       *}
{* Licensed under the Apache License, Version 2.0 (the "License");                       *}
{* you may not use this file except in compliance with the License.                      *}
{* You may obtain a copy of the License at                                               *}
{*                                                                                       *}
{*     http://www.apache.org/licenses/LICENSE-2.0                                        *}
{*                                                                                       *}
{* Unless required by applicable law or agreed to in writing, software                   *}
{* distributed under the License is distributed on an "AS IS" BASIS,                     *}
{* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.              *}
{* See the License for the specific language governing permissions and                   *}
{* limitations under the License.                                                        *}
{*                                                                                       *}
{* FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY                   *}
{* DYNARITHMIC SOFTWARE. DYNARITHMIC SOFTWARE DISCLAIMS THE WARRANTY OF NON INFRINGEMENT *}
{* OF THIRD PARTY RIGHTS.                                                                *}

{*******************************************************}
{                                                       }
{       DTWAIN Delphi definitions                       }
{                                                       }
{*******************************************************}

unit dtwain32;
{$A+,Z+}

interface
uses Windows, CommDlg;

type

  WCHAR = WideChar;
  PWChar = PWideChar;
  HWND = NativeInt;

  LPSTR = PAnsiChar;
  LPCSTR = PAnsiChar;
  LPWSTR = PWideChar;
  LPCWSTR = PWideChar;
  LPCTSTR = PAnsiChar;
  LPTSTR = PAnsiChar;
  LPVOID = Pointer;
  DTWAIN_CALLBACK_PROC = Pointer;
  DTWAIN_CALLBACK_PROC64 = Pointer;
  DTWAIN_DIBUPDATE_PROC = Pointer;
  DTWAIN_LOGGER_PROC = Pointer;
  DWORD = UInt32;
  BOOL = LONG;
  PBOOL = ^BOOL;
  PByte = ^Byte;
  PINT = ^Integer;
  PSingle = ^Single;
  PWORD = ^Word;
  PDWORD = ^DWORD;
  LPDWORD = PDWORD;
  LONG = LongInt;

  UCHAR = Byte;
  PUCHAR = ^Byte;
  LPBYTE = ^Byte;
  SHORT = Smallint;
  UINT = Integer;
  PUINT = ^UINT;
  ULONG = Longint;
  PULONG = ^ULONG;
  PLongint = ^Longint;
  LPLONG = PLongInt;
  PInteger = ^Integer;

  LCID = DWORD;
  LANGID = Word;

  THandle = Integer;
  PHandle = ^THandle;

  WPARAM = Longint;
  LPARAM = Longint;
  LRESULT = Longint;

  PPoint = ^TPoint;
  TPoint = record
    x: Longint;
    y: Longint;
  end;

{ Message structure }
  PMsg = ^MSG;
  MSG = packed record
    hwnd: HWND;
    message: UINT;
    wParam: WPARAM;
    lParam: LPARAM;
    time: DWORD;
    pt: TPoint;
  end;

   TW_UINT16   = WORD;         // unsigned short TW_UINT16
   pTW_UINT16  = ^TW_UINT16;
   TTWUInt16   = TW_UINT16;
   PTWUInt16   = pTW_UINT16;

   TW_BOOL     = WORDBOOL;     // unsigned short TW_BOOL
   pTW_BOOL    = ^TW_BOOL;
   TTWBool     = TW_BOOL;
   PTWBool     = pTW_BOOL;

   TW_STR32    = Array[0..33] of Char;   // char TW_STR32[34]
   pTW_STR32   = ^TW_STR32;
   TTWStr32    = TW_STR32;
   PTWStr32    = pTW_STR32;

   TW_STR255   = Array[0..255] of Char;  // char TW_STR255[256]
   pTW_STR255  = ^TW_STR255;
   TTWStr255   = TW_STR255;
   PTWStr255   = pTW_STR255;

   TW_INT16    = SmallInt;    // short TW_INT16
   pTW_INT16   = ^TW_INT16;
   TTWInt16    = TW_INT16;
   PTWInt16    = pTW_INT16;

   TW_UINT32   = ULONG;       // unsigned long TW_UINT32
   pTW_UINT32  = ^TW_UINT32;
   TTWUInt32   = TW_UINT32;
   PTWUInt32   = pTW_UINT32;

   TW_HANDLE   = THandle;
   TTWHandle   = TW_HANDLE;
   TW_MEMREF   = Pointer;
   TTWMemRef   = TW_MEMREF;

   TW_VERSION = Packed record
      MajorNum : TW_UINT16;  
      MinorNum : TW_UINT16;  
      Language : TW_UINT16;  
      Country  : TW_UINT16;
      Info     : TW_STR32;   
      End;

   pTW_VERSION = ^TW_VERSION;
   PTWVersion  = pTW_VERSION;
   TTWVersion  = TW_VERSION;

   TW_IDENTITY = Packed record
      Id              : TW_UINT32;  
      Version         : TW_VERSION; 
      ProtocolMajor   : TW_UINT16;  
      ProtocolMinor   : TW_UINT16;  
      SupportedGroups : TW_UINT32;  
      Manufacturer    : TW_STR32;   
      ProductFamily   : TW_STR32;   
      ProductName     : TW_STR32;   
      end;
   pTW_IDENTITY = ^TW_IDENTITY;

  { DTWAIN Types }
  LPLONG64 = ^Int64;
  DTWAIN_FLOAT = Double;
  LPDTWAIN_FLOAT = ^Double;
  DTWAIN_BOOL  = LongBool;
  DTWAIN_SOURCE = NativeInt;
  DTWAIN_OCRENGINE = NativeInt;
  DTWAIN_PDFTEXTELEMENT = NativeInt;
  DTWAIN_OCRTEXTINFOHANDLE = NativeInt;
  DTWAIN_HANDLE = NativeInt;
  DTWAIN_ARRAY = NativeInt;
  LPDTWAIN_ARRAY = ^NativeInt;
  TWAIN_IDENTITY = LPVOID;
  DTWAIN_FRAME = DTWAIN_ARRAY;
  DTWAIN_RANGE = DTWAIN_ARRAY;
  LPDTWAIN_SOURCE = ^DTWAIN_SOURCE;
  DTWAIN_IDENTITY = NativeInt;
  DTWAIN_MEMORY_PTR = DTWAIN_HANDLE;
  HFONT = NativeInt;
  TOpenFilenamePtr = ^TOpenFilename;


  { Function types }
   DTwainCallback = function(wParam:NativeInt; lParam:NativeInt; userData:NativeInt) : NativeInt; stdcall;
   DTwainCallback64 = function(wParam:NativeInt; lParam:NativeInt; userData:Int64): NativeInt; stdcall;
   DTwainDIBUpdateProc = function(lpSource:DTWAIN_SOURCE; currentImage:Integer; DibData:DTWAIN_HANDLE):DTWAIN_HANDLE;stdcall;
   DTwainErrorProc = function( param1:Integer; param2:Integer):NativeInt; stdcall;
   DTwainErrorProc64 = function( param1:Integer; param2:Int64):NativeInt; stdcall;
   DTwainLoggerProcA = function(lpszName:LPSTR; userData:Int64):NativeInt; stdcall;
   DTwainLoggerProcW = function(lpszName:LPWSTR; userData:Int64):NativeInt; stdcall;
   DTwainLoggerProc = function(lpszName:LPTSTR; userData:Int64):NativeInt; stdcall;

const

  DTWAIN_FF_TIFF = 0;
  DTWAIN_FF_PICT = 1;
  DTWAIN_FF_BMP = 2;
  DTWAIN_FF_XBM = 3;
  DTWAIN_FF_JFIF = 4;
  DTWAIN_FF_FPX = 5;
  DTWAIN_FF_TIFFMULTI = 6;
  DTWAIN_FF_PNG = 7;
  DTWAIN_FF_SPIFF = 8;
  DTWAIN_FF_EXIF = 9;
  DTWAIN_FF_PDF = 10;
  DTWAIN_FF_JP2 = 11;
  DTWAIN_FF_JPX = 13;
  DTWAIN_FF_DEJAVU = 14;
  DTWAIN_FF_PDFA = 15;
  DTWAIN_FF_PDFA2 = 16;
  DTWAIN_FF_PDFRASTER = 17;
  DTWAIN_CP_NONE = 0;
  DTWAIN_CP_PACKBITS = 1;
  DTWAIN_CP_GROUP31D = 2;
  DTWAIN_CP_GROUP31DEOL = 3;
  DTWAIN_CP_GROUP32D = 4;
  DTWAIN_CP_GROUP4 = 5;
  DTWAIN_CP_JPEG = 6;
  DTWAIN_CP_LZW = 7;
  DTWAIN_CP_JBIG = 8;
  DTWAIN_CP_PNG = 9;
  DTWAIN_CP_RLE4 = 10;
  DTWAIN_CP_RLE8 = 11;
  DTWAIN_CP_BITFIELDS = 12;
  DTWAIN_CP_ZIP = 13;
  DTWAIN_CP_JPEG2000 = 14;
  DTWAIN_FS_NONE = 0;
  DTWAIN_FS_A4LETTER = 1;
  DTWAIN_FS_B5LETTER = 2;
  DTWAIN_FS_USLETTER = 3;
  DTWAIN_FS_USLEGAL = 4;
  DTWAIN_FS_A5 = 5;
  DTWAIN_FS_B4 = 6;
  DTWAIN_FS_B6 = 7;
  DTWAIN_FS_USLEDGER = 9;
  DTWAIN_FS_USEXECUTIVE = 10;
  DTWAIN_FS_A3 = 11;
  DTWAIN_FS_B3 = 12;
  DTWAIN_FS_A6 = 13;
  DTWAIN_FS_C4 = 14;
  DTWAIN_FS_C5 = 15;
  DTWAIN_FS_C6 = 16;
  DTWAIN_FS_4A0 = 17;
  DTWAIN_FS_2A0 = 18;
  DTWAIN_FS_A0 = 19;
  DTWAIN_FS_A1 = 20;
  DTWAIN_FS_A2 = 21;
  DTWAIN_FS_A4 = DTWAIN_FS_A4LETTER;
  DTWAIN_FS_A7 = 22;
  DTWAIN_FS_A8 = 23;
  DTWAIN_FS_A9 = 24;
  DTWAIN_FS_A10 = 25;
  DTWAIN_FS_ISOB0 = 26;
  DTWAIN_FS_ISOB1 = 27;
  DTWAIN_FS_ISOB2 = 28;
  DTWAIN_FS_ISOB3 = DTWAIN_FS_B3;
  DTWAIN_FS_ISOB4 = DTWAIN_FS_B4;
  DTWAIN_FS_ISOB5 = 29;
  DTWAIN_FS_ISOB6 = DTWAIN_FS_B6;
  DTWAIN_FS_ISOB7 = 30;
  DTWAIN_FS_ISOB8 = 31;
  DTWAIN_FS_ISOB9 = 32;
  DTWAIN_FS_ISOB10 = 33;
  DTWAIN_FS_JISB0 = 34;
  DTWAIN_FS_JISB1 = 35;
  DTWAIN_FS_JISB2 = 36;
  DTWAIN_FS_JISB3 = 37;
  DTWAIN_FS_JISB4 = 38;
  DTWAIN_FS_JISB5 = DTWAIN_FS_B5LETTER;
  DTWAIN_FS_JISB6 = 39;
  DTWAIN_FS_JISB7 = 40;
  DTWAIN_FS_JISB8 = 41;
  DTWAIN_FS_JISB9 = 42;
  DTWAIN_FS_JISB10 = 43;
  DTWAIN_FS_C0 = 44;
  DTWAIN_FS_C1 = 45;
  DTWAIN_FS_C2 = 46;
  DTWAIN_FS_C3 = 47;
  DTWAIN_FS_C7 = 48;
  DTWAIN_FS_C8 = 49;
  DTWAIN_FS_C9 = 50;
  DTWAIN_FS_C10 = 51;
  DTWAIN_FS_USSTATEMENT = 52;
  DTWAIN_FS_BUSINESSCARD = 53;
  DTWAIN_ANYSUPPORT = (-1);
  DTWAIN_BMP = 100;
  DTWAIN_JPEG = 200;
  DTWAIN_PDF = 250;
  DTWAIN_PDFMULTI = 251;
  DTWAIN_PCX = 300;
  DTWAIN_DCX = 301;
  DTWAIN_TGA = 400;
  DTWAIN_TIFFLZW = 500;
  DTWAIN_TIFFNONE = 600;
  DTWAIN_TIFFG3 = 700;
  DTWAIN_TIFFG4 = 800;
  DTWAIN_TIFFPACKBITS = 801;
  DTWAIN_TIFFDEFLATE = 802;
  DTWAIN_TIFFJPEG = 803;
  DTWAIN_TIFFJBIG = 804;
  DTWAIN_TIFFPIXARLOG = 805;
  DTWAIN_TIFFNONEMULTI = 900;
  DTWAIN_TIFFG3MULTI = 901;
  DTWAIN_TIFFG4MULTI = 902;
  DTWAIN_TIFFPACKBITSMULTI = 903;
  DTWAIN_TIFFDEFLATEMULTI = 904;
  DTWAIN_TIFFJPEGMULTI = 905;
  DTWAIN_TIFFLZWMULTI = 906;
  DTWAIN_TIFFJBIGMULTI = 907;
  DTWAIN_TIFFPIXARLOGMULTI = 908;
  DTWAIN_WMF = 850;
  DTWAIN_EMF = 851;
  DTWAIN_GIF = 950;
  DTWAIN_PNG = 1000;
  DTWAIN_PSD = 2000;
  DTWAIN_JPEG2000 = 3000;
  DTWAIN_POSTSCRIPT1 = 4000;
  DTWAIN_POSTSCRIPT2 = 4001;
  DTWAIN_POSTSCRIPT3 = 4002;
  DTWAIN_POSTSCRIPT1MULTI = 4003;
  DTWAIN_POSTSCRIPT2MULTI = 4004;
  DTWAIN_POSTSCRIPT3MULTI = 4005;
  DTWAIN_TEXT = 6000;
  DTWAIN_TEXTMULTI = 6001;
  DTWAIN_TIFFMULTI = 7000;
  DTWAIN_ICO = 8000;
  DTWAIN_ICO_VISTA = 8001;
  DTWAIN_ICO_RESIZED = 8002;
  DTWAIN_WBMP = 8500;
  DTWAIN_WEBP = 8501;
  DTWAIN_PPM = 10000;
  DTWAIN_WBMP_RESIZED = 11000;
  DTWAIN_TGA_RLE = 11001;
  DTWAIN_BMP_RLE = 11002;
  DTWAIN_BIGTIFFLZW = 11003;
  DTWAIN_BIGTIFFLZWMULTI = 11004;
  DTWAIN_BIGTIFFNONE = 11005;
  DTWAIN_BIGTIFFNONEMULTI = 11006;
  DTWAIN_BIGTIFFPACKBITS = 11007;
  DTWAIN_BIGTIFFPACKBITSMULTI = 11008;
  DTWAIN_BIGTIFFDEFLATE = 11009;
  DTWAIN_BIGTIFFDEFLATEMULTI = 11010;
  DTWAIN_BIGTIFFG3 = 11011;
  DTWAIN_BIGTIFFG3MULTI = 11012;
  DTWAIN_BIGTIFFG4 = 11013;
  DTWAIN_BIGTIFFG4MULTI = 11014;
  DTWAIN_BIGTIFFJPEG = 11015;
  DTWAIN_BIGTIFFJPEGMULTI = 11016;
  DTWAIN_JPEGXR = 12000;
  DTWAIN_SVG = 13000;
  DTWAIN_SVGZ = 13001;
  DTWAIN_INCHES = 0;
  DTWAIN_CENTIMETERS = 1;
  DTWAIN_PICAS = 2;
  DTWAIN_POINTS = 3;
  DTWAIN_TWIPS = 4;
  DTWAIN_PIXELS = 5;
  DTWAIN_MILLIMETERS = 6;
  DTWAIN_USENAME = 16;
  DTWAIN_USEPROMPT = 32;
  DTWAIN_USELONGNAME = 64;
  DTWAIN_USESOURCEMODE = 128;
  DTWAIN_USELIST = 256;
  DTWAIN_CREATE_DIRECTORY = 512;
  DTWAIN_NODELETEDIBS = 1024;
  DTWAIN_CREATEDIRECTORY = DTWAIN_CREATE_DIRECTORY;
  DTWAIN_ARRAYANY = 1;
  DTWAIN_ArrayTypePTR = 1;
  DTWAIN_ARRAYLONG = 2;
  DTWAIN_ARRAYFLOAT = 3;
  DTWAIN_ARRAYHANDLE = 4;
  DTWAIN_ARRAYSOURCE = 5;
  DTWAIN_ARRAYSTRING = 6;
  DTWAIN_ARRAYFRAME = 7;
  DTWAIN_ARRAYBOOL = DTWAIN_ARRAYLONG;
  DTWAIN_ARRAYLONGSTRING = 8;
  DTWAIN_ARRAYUNICODESTRING = 9;
  DTWAIN_ARRAYLONG64 = 10;
  DTWAIN_ARRAYANSISTRING = 11;
  DTWAIN_ARRAYWIDESTRING = 12;
  DTWAIN_ARRAYULONG = 13;
  DTWAIN_ARRAYTWFIX32 = 200;
  DTWAIN_ArrayTypeINVALID = 0;
  DTWAIN_ARRAYINT16 = 100;
  DTWAIN_ARRAYUINT16 = 110;
  DTWAIN_ARRAYUINT32 = 120;
  DTWAIN_ARRAYINT32 = 130;
  DTWAIN_ARRAYINT64 = 140;
  DTWAIN_ARRAYUINT64 = 150;
  DTWAIN_ARRAYSHORTINT16 = 160;
  DTWAIN_ARRAYSHORTUINT16 = 170;
  DTWAIN_RANGELONG = DTWAIN_ARRAYLONG;
  DTWAIN_RANGEFLOAT = DTWAIN_ARRAYFLOAT;
  DTWAIN_RANGEMIN = 0;
  DTWAIN_RANGEMAX = 1;
  DTWAIN_RANGESTEP = 2;
  DTWAIN_RANGEDEFAULT = 3;
  DTWAIN_RANGECURRENT = 4;
  DTWAIN_FRAMELEFT = 0;
  DTWAIN_FRAMETOP = 1;
  DTWAIN_FRAMERIGHT = 2;
  DTWAIN_FRAMEBOTTOM = 3;
  DTWAIN_FIX32WHOLE = 0;
  DTWAIN_FIX32FRAC = 1;
  DTWAIN_JC_NONE = 0;
  DTWAIN_JC_JSIC = 1;
  DTWAIN_JC_JSIS = 2;
  DTWAIN_JC_JSXC = 3;
  DTWAIN_JC_JSXS = 4;
  DTWAIN_CAPDATATYPE_UNKNOWN = (-10);
  DTWAIN_JCBP_JSIC = 5;
  DTWAIN_JCBP_JSIS = 6;
  DTWAIN_JCBP_JSXC = 7;
  DTWAIN_JCBP_JSXS = 8;
  DTWAIN_FEEDPAGEON = 1;
  DTWAIN_CLEARPAGEON = 2;
  DTWAIN_REWINDPAGEON = 4;
  DTWAIN_AppOwnsDib = 1;
  DTWAIN_SourceOwnsDib = 2;
  DTWAIN_CONTARRAY = 8;
  DTWAIN_CONTENUMERATION = 16;
  DTWAIN_CONTONEVALUE = 32;
  DTWAIN_CONTRANGE = 64;
  DTWAIN_CONTDEFAULT = 0;
  DTWAIN_CAPGET = 1;
  DTWAIN_CAPGETCURRENT = 2;
  DTWAIN_CAPGETDEFAULT = 3;
  DTWAIN_CAPSET = 6;
  DTWAIN_CAPRESET = 7;
  DTWAIN_CAPRESETALL = 8;
  DTWAIN_CAPSETAVAILABLE = 8;
  DTWAIN_CAPSETCURRENT = 16;
  DTWAIN_CAPGETHELP = 9;
  DTWAIN_CAPGETLABEL = 10;
  DTWAIN_CAPGETLABELENUM = 11;
  DTWAIN_CAPSETCONSTRAINT = 12;
  DTWAIN_AREASET = DTWAIN_CAPSET;
  DTWAIN_AREARESET = DTWAIN_CAPRESET;
  DTWAIN_AREACURRENT = DTWAIN_CAPGETCURRENT;
  DTWAIN_AREADEFAULT = DTWAIN_CAPGETDEFAULT;
  DTWAIN_VER15 = 0;
  DTWAIN_VER16 = 1;
  DTWAIN_VER17 = 2;
  DTWAIN_VER18 = 3;
  DTWAIN_VER20 = 4;
  DTWAIN_VER21 = 5;
  DTWAIN_VER22 = 6;
  DTWAIN_ACQUIREALL = (-1);
  DTWAIN_MAXACQUIRE = (-1);
  DTWAIN_DX_NONE = 0;
  DTWAIN_DX_1PASSDUPLEX = 1;
  DTWAIN_DX_2PASSDUPLEX = 2;
  DTWAIN_PT_BW = 0;
  DTWAIN_PT_GRAY = 1;
  DTWAIN_PT_RGB = 2;
  DTWAIN_PT_PALETTE = 3;
  DTWAIN_PT_CMY = 4;
  DTWAIN_PT_CMYK = 5;
  DTWAIN_PT_YUV = 6;
  DTWAIN_PT_YUVK = 7;
  DTWAIN_PT_CIEXYZ = 8;
  DTWAIN_PT_DEFAULT = 1000;
  DTWAIN_CURRENT = (-2);
  DTWAIN_DEFAULT = (-1);
  DTWAIN_FLOATDEFAULT = (-9999.0);
  DTWAIN_CallbackERROR = 1;
  DTWAIN_CallbackMESSAGE = 2;
  DTWAIN_USENATIVE = 1;
  DTWAIN_USEBUFFERED = 2;
  DTWAIN_USECOMPRESSION = 4;
  DTWAIN_USEMEMFILE = 8;
  DTWAIN_FAILURE1 = (-1);
  DTWAIN_FAILURE2 = (-2);
  DTWAIN_DELETEALL = (-1);
  DTWAIN_TN_ACQUIREDONE = 1000;
  DTWAIN_TN_ACQUIREFAILED = 1001;
  DTWAIN_TN_ACQUIRECANCELLED = 1002;
  DTWAIN_TN_ACQUIRESTARTED = 1003;
  DTWAIN_TN_PAGECONTINUE = 1004;
  DTWAIN_TN_PAGEFAILED = 1005;
  DTWAIN_TN_PAGECANCELLED = 1006;
  DTWAIN_TN_TRANSFERREADY = 1009;
  DTWAIN_TN_TRANSFERDONE = 1010;
  DTWAIN_TN_ACQUIREPAGEDONE = 1010;
  DTWAIN_TN_UICLOSING = 3000;
  DTWAIN_TN_UICLOSED = 3001;
  DTWAIN_TN_UIOPENED = 3002;
  DTWAIN_TN_UIOPENING = 3003;
  DTWAIN_TN_UIOPENFAILURE = 3004;
  DTWAIN_TN_CLIPTRANSFERDONE = 1014;
  DTWAIN_TN_INVALIDIMAGEFORMAT = 1015;
  DTWAIN_TN_ACQUIRETERMINATED = 1021;
  DTWAIN_TN_TRANSFERSTRIPREADY = 1022;
  DTWAIN_TN_TRANSFERSTRIPDONE = 1023;
  DTWAIN_TN_TRANSFERSTRIPFAILED = 1029;
  DTWAIN_TN_IMAGEINFOERROR = 1024;
  DTWAIN_TN_TRANSFERCANCELLED = 1030;
  DTWAIN_TN_FILESAVECANCELLED = 1031;
  DTWAIN_TN_FILESAVEOK = 1032;
  DTWAIN_TN_FILESAVEERROR = 1033;
  DTWAIN_TN_FILEPAGESAVEOK = 1034;
  DTWAIN_TN_FILEPAGESAVEERROR = 1035;
  DTWAIN_TN_PROCESSEDDIB = 1036;
  DTWAIN_TN_FEEDERLOADED = 1037;
  DTWAIN_TN_GENERALERROR = 1038;
  DTWAIN_TN_MANDUPFLIPPAGES = 1040;
  DTWAIN_TN_MANDUPSIDE1DONE = 1041;
  DTWAIN_TN_MANDUPSIDE2DONE = 1042;
  DTWAIN_TN_MANDUPPAGECOUNTERROR = 1043;
  DTWAIN_TN_MANDUPACQUIREDONE = 1044;
  DTWAIN_TN_MANDUPSIDE1START = 1045;
  DTWAIN_TN_MANDUPSIDE2START = 1046;
  DTWAIN_TN_MANDUPMERGEERROR = 1047;
  DTWAIN_TN_MANDUPMEMORYERROR = 1048;
  DTWAIN_TN_MANDUPFILEERROR = 1049;
  DTWAIN_TN_MANDUPFILESAVEERROR = 1050;
  DTWAIN_TN_ENDOFJOBDETECTED = 1051;
  DTWAIN_TN_EOJDETECTED = 1051;
  DTWAIN_TN_EOJDETECTED_XFERDONE = 1052;
  DTWAIN_TN_QUERYPAGEDISCARD = 1053;
  DTWAIN_TN_PAGEDISCARDED = 1054;
  DTWAIN_TN_PROCESSDIBACCEPTED = 1055;
  DTWAIN_TN_PROCESSDIBFINALACCEPTED = 1056;
  DTWAIN_TN_CLOSEDIBFAILED = 1057;
  DTWAIN_TN_INVALID_TWAINDSM2_BITMAP = 1058;
  DTWAIN_TN_IMAGE_RESAMPLE_FAILURE = 1059;
  DTWAIN_TN_DEVICEEVENT = 1100;
  DTWAIN_TN_TWAINPAGECANCELLED = 1105;
  DTWAIN_TN_TWAINPAGEFAILED = 1106;
  DTWAIN_TN_APPUPDATEDDIB = 1107;
  DTWAIN_TN_FILEPAGESAVING = 1110;
  DTWAIN_TN_EOJBEGINFILESAVE = 1112;
  DTWAIN_TN_EOJENDFILESAVE = 1113;
  DTWAIN_TN_CROPFAILED = 1120;
  DTWAIN_TN_PROCESSEDDIBFINAL = 1121;
  DTWAIN_TN_BLANKPAGEDETECTED1 = 1130;
  DTWAIN_TN_BLANKPAGEDETECTED2 = 1131;
  DTWAIN_TN_BLANKPAGEDETECTED3 = 1132;
  DTWAIN_TN_BLANKPAGEDISCARDED1 = 1133;
  DTWAIN_TN_BLANKPAGEDISCARDED2 = 1134;
  DTWAIN_TN_OCRTEXTRETRIEVED = 1140;
  DTWAIN_TN_QUERYOCRTEXT = 1141;
  DTWAIN_TN_PDFOCRREADY = 1142;
  DTWAIN_TN_PDFOCRDONE = 1143;
  DTWAIN_TN_PDFOCRERROR = 1144;
  DTWAIN_TN_SETCALLBACKINIT = 1150;
  DTWAIN_TN_SETCALLBACK64INIT = 1151;
  DTWAIN_TN_FILENAMECHANGING = 1160;
  DTWAIN_TN_FILENAMECHANGED = 1161;
  DTWAIN_TN_PROCESSEDAUDIOFINAL = 1180;
  DTWAIN_TN_PROCESSAUDIOFINALACCEPTED = 1181;
  DTWAIN_TN_PROCESSEDAUDIOFILE = 1182;
  DTWAIN_TN_TWAINTRIPLETBEGIN = 1183;
  DTWAIN_TN_TWAINTRIPLETEND = 1184;
  DTWAIN_TN_FEEDERNOTLOADED = 1201;
  DTWAIN_TN_FEEDERTIMEOUT = 1202;
  DTWAIN_TN_FEEDERNOTENABLED = 1203;
  DTWAIN_TN_FEEDERNOTSUPPORTED = 1204;
  DTWAIN_TN_FEEDERTOFLATBED = 1205;
  DTWAIN_TN_PREACQUIRESTART = 1206;
  DTWAIN_TN_TRANSFERTILEREADY = 1300;
  DTWAIN_TN_TRANSFERTILEDONE = 1301;
  DTWAIN_TN_FILECOMPRESSTYPEMISMATCH = 1302;
  DTWAIN_TN_SOURCEDETAILS = 1304;
  DTWAIN_TN_QUERYACQUIREPAGES = 1305;
  DTWAIN_TN_ACQUIREPAGESSTOPPING = 1306;
  DTWAIN_TN_ACQUIREPAGESSTOPPED = 1307;
  DTWAIN_TN_QUERYUPDATEDIBORIG = 1308;
  DTWAIN_TN_QUERYUPDATEDIBRESAMPLED = 1309;
  DTWAIN_PDFOCR_CLEANTEXT1 = 1;
  DTWAIN_PDFOCR_CLEANTEXT2 = 2;
  DTWAIN_MODAL = 0;
  DTWAIN_MODELESS = 1;
  DTWAIN_UIModeCLOSE = 0;
  DTWAIN_UIModeOPEN = 1;
  DTWAIN_REOPEN_SOURCE = 2;
  DTWAIN_ROUNDNEAREST = 0;
  DTWAIN_ROUNDUP = 1;
  DTWAIN_ROUNDDOWN = 2;
  DTWAIN_FLOATDELTA = (+1.0e-8);
  DTWAIN_OR_ROT0 = 0;
  DTWAIN_OR_ROT90 = 1;
  DTWAIN_OR_ROT180 = 2;
  DTWAIN_OR_ROT270 = 3;
  DTWAIN_OR_PORTRAIT = DTWAIN_OR_ROT0;
  DTWAIN_OR_LANDSCAPE = DTWAIN_OR_ROT270;
  DTWAIN_OR_ANYROTATION = (-1);
  DTWAIN_CO_GET = $0001;
  DTWAIN_CO_SET = $0002;
  DTWAIN_CO_GETDEFAULT = $0004;
  DTWAIN_CO_GETCURRENT = $0008;
  DTWAIN_CO_RESET = $0010;
  DTWAIN_CO_SETCONSTRAINT = $0020;
  DTWAIN_CO_CONSTRAINABLE = $0040;
  DTWAIN_CO_GETHELP = $0100;
  DTWAIN_CO_GETLABEL = $0200;
  DTWAIN_CO_GETLABELENUM = $0400;
  DTWAIN_CNTYAFGHANISTAN = 1001;
  DTWAIN_CNTYALGERIA = 213;
  DTWAIN_CNTYAMERICANSAMOA = 684;
  DTWAIN_CNTYANDORRA = 33;
  DTWAIN_CNTYANGOLA = 1002;
  DTWAIN_CNTYANGUILLA = 8090;
  DTWAIN_CNTYANTIGUA = 8091;
  DTWAIN_CNTYARGENTINA = 54;
  DTWAIN_CNTYARUBA = 297;
  DTWAIN_CNTYASCENSIONI = 247;
  DTWAIN_CNTYAUSTRALIA = 61;
  DTWAIN_CNTYAUSTRIA = 43;
  DTWAIN_CNTYBAHAMAS = 8092;
  DTWAIN_CNTYBAHRAIN = 973;
  DTWAIN_CNTYBANGLADESH = 880;
  DTWAIN_CNTYBARBADOS = 8093;
  DTWAIN_CNTYBELGIUM = 32;
  DTWAIN_CNTYBELIZE = 501;
  DTWAIN_CNTYBENIN = 229;
  DTWAIN_CNTYBERMUDA = 8094;
  DTWAIN_CNTYBHUTAN = 1003;
  DTWAIN_CNTYBOLIVIA = 591;
  DTWAIN_CNTYBOTSWANA = 267;
  DTWAIN_CNTYBRITAIN = 6;
  DTWAIN_CNTYBRITVIRGINIS = 8095;
  DTWAIN_CNTYBRAZIL = 55;
  DTWAIN_CNTYBRUNEI = 673;
  DTWAIN_CNTYBULGARIA = 359;
  DTWAIN_CNTYBURKINAFASO = 1004;
  DTWAIN_CNTYBURMA = 1005;
  DTWAIN_CNTYBURUNDI = 1006;
  DTWAIN_CNTYCAMAROON = 237;
  DTWAIN_CNTYCANADA = 2;
  DTWAIN_CNTYCAPEVERDEIS = 238;
  DTWAIN_CNTYCAYMANIS = 8096;
  DTWAIN_CNTYCENTRALAFREP = 1007;
  DTWAIN_CNTYCHAD = 1008;
  DTWAIN_CNTYCHILE = 56;
  DTWAIN_CNTYCHINA = 86;
  DTWAIN_CNTYCHRISTMASIS = 1009;
  DTWAIN_CNTYCOCOSIS = 1009;
  DTWAIN_CNTYCOLOMBIA = 57;
  DTWAIN_CNTYCOMOROS = 1010;
  DTWAIN_CNTYCONGO = 1011;
  DTWAIN_CNTYCOOKIS = 1012;
  DTWAIN_CNTYCOSTARICA = 506;
  DTWAIN_CNTYCUBA = 5;
  DTWAIN_CNTYCYPRUS = 357;
  DTWAIN_CNTYCZECHOSLOVAKIA = 42;
  DTWAIN_CNTYDENMARK = 45;
  DTWAIN_CNTYDJIBOUTI = 1013;
  DTWAIN_CNTYDOMINICA = 8097;
  DTWAIN_CNTYDOMINCANREP = 8098;
  DTWAIN_CNTYEASTERIS = 1014;
  DTWAIN_CNTYECUADOR = 593;
  DTWAIN_CNTYEGYPT = 20;
  DTWAIN_CNTYELSALVADOR = 503;
  DTWAIN_CNTYEQGUINEA = 1015;
  DTWAIN_CNTYETHIOPIA = 251;
  DTWAIN_CNTYFALKLANDIS = 1016;
  DTWAIN_CNTYFAEROEIS = 298;
  DTWAIN_CNTYFIJIISLANDS = 679;
  DTWAIN_CNTYFINLAND = 358;
  DTWAIN_CNTYFRANCE = 33;
  DTWAIN_CNTYFRANTILLES = 596;
  DTWAIN_CNTYFRGUIANA = 594;
  DTWAIN_CNTYFRPOLYNEISA = 689;
  DTWAIN_CNTYFUTANAIS = 1043;
  DTWAIN_CNTYGABON = 241;
  DTWAIN_CNTYGAMBIA = 220;
  DTWAIN_CNTYGERMANY = 49;
  DTWAIN_CNTYGHANA = 233;
  DTWAIN_CNTYGIBRALTER = 350;
  DTWAIN_CNTYGREECE = 30;
  DTWAIN_CNTYGREENLAND = 299;
  DTWAIN_CNTYGRENADA = 8099;
  DTWAIN_CNTYGRENEDINES = 8015;
  DTWAIN_CNTYGUADELOUPE = 590;
  DTWAIN_CNTYGUAM = 671;
  DTWAIN_CNTYGUANTANAMOBAY = 5399;
  DTWAIN_CNTYGUATEMALA = 502;
  DTWAIN_CNTYGUINEA = 224;
  DTWAIN_CNTYGUINEABISSAU = 1017;
  DTWAIN_CNTYGUYANA = 592;
  DTWAIN_CNTYHAITI = 509;
  DTWAIN_CNTYHONDURAS = 504;
  DTWAIN_CNTYHONGKONG = 852;
  DTWAIN_CNTYHUNGARY = 36;
  DTWAIN_CNTYICELAND = 354;
  DTWAIN_CNTYINDIA = 91;
  DTWAIN_CNTYINDONESIA = 62;
  DTWAIN_CNTYIRAN = 98;
  DTWAIN_CNTYIRAQ = 964;
  DTWAIN_CNTYIRELAND = 353;
  DTWAIN_CNTYISRAEL = 972;
  DTWAIN_CNTYITALY = 39;
  DTWAIN_CNTYIVORYCOAST = 225;
  DTWAIN_CNTYJAMAICA = 8010;
  DTWAIN_CNTYJAPAN = 81;
  DTWAIN_CNTYJORDAN = 962;
  DTWAIN_CNTYKENYA = 254;
  DTWAIN_CNTYKIRIBATI = 1018;
  DTWAIN_CNTYKOREA = 82;
  DTWAIN_CNTYKUWAIT = 965;
  DTWAIN_CNTYLAOS = 1019;
  DTWAIN_CNTYLEBANON = 1020;
  DTWAIN_CNTYLIBERIA = 231;
  DTWAIN_CNTYLIBYA = 218;
  DTWAIN_CNTYLIECHTENSTEIN = 41;
  DTWAIN_CNTYLUXENBOURG = 352;
  DTWAIN_CNTYMACAO = 853;
  DTWAIN_CNTYMADAGASCAR = 1021;
  DTWAIN_CNTYMALAWI = 265;
  DTWAIN_CNTYMALAYSIA = 60;
  DTWAIN_CNTYMALDIVES = 960;
  DTWAIN_CNTYMALI = 1022;
  DTWAIN_CNTYMALTA = 356;
  DTWAIN_CNTYMARSHALLIS = 692;
  DTWAIN_CNTYMAURITANIA = 1023;
  DTWAIN_CNTYMAURITIUS = 230;
  DTWAIN_CNTYMEXICO = 3;
  DTWAIN_CNTYMICRONESIA = 691;
  DTWAIN_CNTYMIQUELON = 508;
  DTWAIN_CNTYMONACO = 33;
  DTWAIN_CNTYMONGOLIA = 1024;
  DTWAIN_CNTYMONTSERRAT = 8011;
  DTWAIN_CNTYMOROCCO = 212;
  DTWAIN_CNTYMOZAMBIQUE = 1025;
  DTWAIN_CNTYNAMIBIA = 264;
  DTWAIN_CNTYNAURU = 1026;
  DTWAIN_CNTYNEPAL = 977;
  DTWAIN_CNTYNETHERLANDS = 31;
  DTWAIN_CNTYNETHANTILLES = 599;
  DTWAIN_CNTYNEVIS = 8012;
  DTWAIN_CNTYNEWCALEDONIA = 687;
  DTWAIN_CNTYNEWZEALAND = 64;
  DTWAIN_CNTYNICARAGUA = 505;
  DTWAIN_CNTYNIGER = 227;
  DTWAIN_CNTYNIGERIA = 234;
  DTWAIN_CNTYNIUE = 1027;
  DTWAIN_CNTYNORFOLKI = 1028;
  DTWAIN_CNTYNORWAY = 47;
  DTWAIN_CNTYOMAN = 968;
  DTWAIN_CNTYPAKISTAN = 92;
  DTWAIN_CNTYPALAU = 1029;
  DTWAIN_CNTYPANAMA = 507;
  DTWAIN_CNTYPARAGUAY = 595;
  DTWAIN_CNTYPERU = 51;
  DTWAIN_CNTYPHILLIPPINES = 63;
  DTWAIN_CNTYPITCAIRNIS = 1030;
  DTWAIN_CNTYPNEWGUINEA = 675;
  DTWAIN_CNTYPOLAND = 48;
  DTWAIN_CNTYPORTUGAL = 351;
  DTWAIN_CNTYQATAR = 974;
  DTWAIN_CNTYREUNIONI = 1031;
  DTWAIN_CNTYROMANIA = 40;
  DTWAIN_CNTYRWANDA = 250;
  DTWAIN_CNTYSAIPAN = 670;
  DTWAIN_CNTYSANMARINO = 39;
  DTWAIN_CNTYSAOTOME = 1033;
  DTWAIN_CNTYSAUDIARABIA = 966;
  DTWAIN_CNTYSENEGAL = 221;
  DTWAIN_CNTYSEYCHELLESIS = 1034;
  DTWAIN_CNTYSIERRALEONE = 1035;
  DTWAIN_CNTYSINGAPORE = 65;
  DTWAIN_CNTYSOLOMONIS = 1036;
  DTWAIN_CNTYSOMALI = 1037;
  DTWAIN_CNTYSOUTHAFRICA = 27;
  DTWAIN_CNTYSPAIN = 34;
  DTWAIN_CNTYSRILANKA = 94;
  DTWAIN_CNTYSTHELENA = 1032;
  DTWAIN_CNTYSTKITTS = 8013;
  DTWAIN_CNTYSTLUCIA = 8014;
  DTWAIN_CNTYSTPIERRE = 508;
  DTWAIN_CNTYSTVINCENT = 8015;
  DTWAIN_CNTYSUDAN = 1038;
  DTWAIN_CNTYSURINAME = 597;
  DTWAIN_CNTYSWAZILAND = 268;
  DTWAIN_CNTYSWEDEN = 46;
  DTWAIN_CNTYSWITZERLAND = 41;
  DTWAIN_CNTYSYRIA = 1039;
  DTWAIN_CNTYTAIWAN = 886;
  DTWAIN_CNTYTANZANIA = 255;
  DTWAIN_CNTYTHAILAND = 66;
  DTWAIN_CNTYTOBAGO = 8016;
  DTWAIN_CNTYTOGO = 228;
  DTWAIN_CNTYTONGAIS = 676;
  DTWAIN_CNTYTRINIDAD = 8016;
  DTWAIN_CNTYTUNISIA = 216;
  DTWAIN_CNTYTURKEY = 90;
  DTWAIN_CNTYTURKSCAICOS = 8017;
  DTWAIN_CNTYTUVALU = 1040;
  DTWAIN_CNTYUGANDA = 256;
  DTWAIN_CNTYUSSR = 7;
  DTWAIN_CNTYUAEMIRATES = 971;
  DTWAIN_CNTYUNITEDKINGDOM = 44;
  DTWAIN_CNTYUSA = 1;
  DTWAIN_CNTYURUGUAY = 598;
  DTWAIN_CNTYVANUATU = 1041;
  DTWAIN_CNTYVATICANCITY = 39;
  DTWAIN_CNTYVENEZUELA = 58;
  DTWAIN_CNTYWAKE = 1042;
  DTWAIN_CNTYWALLISIS = 1043;
  DTWAIN_CNTYWESTERNSAHARA = 1044;
  DTWAIN_CNTYWESTERNSAMOA = 1045;
  DTWAIN_CNTYYEMEN = 1046;
  DTWAIN_CNTYYUGOSLAVIA = 38;
  DTWAIN_CNTYZAIRE = 243;
  DTWAIN_CNTYZAMBIA = 260;
  DTWAIN_CNTYZIMBABWE = 263;
  DTWAIN_LANGDANISH = 0;
  DTWAIN_LANGDUTCH = 1;
  DTWAIN_LANGINTERNATIONALENGLISH = 2;
  DTWAIN_LANGFRENCHCANADIAN = 3;
  DTWAIN_LANGFINNISH = 4;
  DTWAIN_LANGFRENCH = 5;
  DTWAIN_LANGGERMAN = 6;
  DTWAIN_LANGICELANDIC = 7;
  DTWAIN_LANGITALIAN = 8;
  DTWAIN_LANGNORWEGIAN = 9;
  DTWAIN_LANGPORTUGUESE = 10;
  DTWAIN_LANGSPANISH = 11;
  DTWAIN_LANGSWEDISH = 12;
  DTWAIN_LANGUSAENGLISH = 13;
  DTWAIN_NO_ERROR = (0);
  DTWAIN_ERR_FIRST = (-1000);
  DTWAIN_ERR_BAD_HANDLE = (-1001);
  DTWAIN_ERR_BAD_SOURCE = (-1002);
  DTWAIN_ERR_BAD_ARRAY = (-1003);
  DTWAIN_ERR_WRONG_ARRAY_TYPE = (-1004);
  DTWAIN_ERR_INDEX_BOUNDS = (-1005);
  DTWAIN_ERR_OUT_OF_MEMORY = (-1006);
  DTWAIN_ERR_NULL_WINDOW = (-1007);
  DTWAIN_ERR_BAD_PIXTYPE = (-1008);
  DTWAIN_ERR_BAD_CONTAINER = (-1009);
  DTWAIN_ERR_NO_SESSION = (-1010);
  DTWAIN_ERR_BAD_ACQUIRE_NUM = (-1011);
  DTWAIN_ERR_BAD_CAP = (-1012);
  DTWAIN_ERR_CAP_NO_SUPPORT = (-1013);
  DTWAIN_ERR_TWAIN = (-1014);
  DTWAIN_ERR_HOOK_FAILED = (-1015);
  DTWAIN_ERR_BAD_FILENAME = (-1016);
  DTWAIN_ERR_EMPTY_ARRAY = (-1017);
  DTWAIN_ERR_FILE_FORMAT = (-1018);
  DTWAIN_ERR_BAD_DIB_PAGE = (-1019);
  DTWAIN_ERR_SOURCE_ACQUIRING = (-1020);
  DTWAIN_ERR_INVALID_PARAM = (-1021);
  DTWAIN_ERR_INVALID_RANGE = (-1022);
  DTWAIN_ERR_UI_ERROR = (-1023);
  DTWAIN_ERR_BAD_UNIT = (-1024);
  DTWAIN_ERR_LANGDLL_NOT_FOUND = (-1025);
  DTWAIN_ERR_SOURCE_NOT_OPEN = (-1026);
  DTWAIN_ERR_DEVICEEVENT_NOT_SUPPORTED = (-1027);
  DTWAIN_ERR_UIONLY_NOT_SUPPORTED = (-1028);
  DTWAIN_ERR_UI_ALREADY_OPENED = (-1029);
  DTWAIN_ERR_CAPSET_NOSUPPORT = (-1030);
  DTWAIN_ERR_NO_FILE_XFER = (-1031);
  DTWAIN_ERR_INVALID_BITDEPTH = (-1032);
  DTWAIN_ERR_NO_CAPS_DEFINED = (-1033);
  DTWAIN_ERR_TILES_NOT_SUPPORTED = (-1034);
  DTWAIN_ERR_INVALID_DTWAIN_FRAME = (-1035);
  DTWAIN_ERR_LIMITED_VERSION = (-1036);
  DTWAIN_ERR_NO_FEEDER = (-1037);
  DTWAIN_ERR_NO_FEEDER_QUERY = (-1038);
  DTWAIN_ERR_EXCEPTION_ERROR = (-1039);
  DTWAIN_ERR_INVALID_STATE = (-1040);
  DTWAIN_ERR_UNSUPPORTED_EXTINFO = (-1041);
  DTWAIN_ERR_DLLRESOURCE_NOTFOUND = (-1042);
  DTWAIN_ERR_NOT_INITIALIZED = (-1043);
  DTWAIN_ERR_NO_SOURCES = (-1044);
  DTWAIN_ERR_TWAIN_NOT_INSTALLED = (-1045);
  DTWAIN_ERR_WRONG_THREAD = (-1046);
  DTWAIN_ERR_BAD_CAPTYPE = (-1047);
  DTWAIN_ERR_UNKNOWN_CAPDATATYPE = (-1048);
  DTWAIN_ERR_DEMO_NOFILETYPE = (-1049);
  DTWAIN_ERR_SOURCESELECTION_CANCELED = (-1050);
  DTWAIN_ERR_RESOURCES_NOT_FOUND = (-1051);
  DTWAIN_ERR_STRINGTYPE_MISMATCH = (-1052);
  DTWAIN_ERR_ARRAYTYPE_MISMATCH = (-1053);
  DTWAIN_ERR_SOURCENAME_NOTINSTALLED = (-1054);
  DTWAIN_ERR_NO_MEMFILE_XFER = (-1055);
  DTWAIN_ERR_AREA_ARRAY_TOO_SMALL = (-1056);
  DTWAIN_ERR_LOG_CREATE_ERROR = (-1057);
  DTWAIN_ERR_FILESYSTEM_NOT_SUPPORTED = (-1058);
  DTWAIN_ERR_TILEMODE_NOTSET = (-1059);
  DTWAIN_ERR_INI32_NOT_FOUND = (-1060);
  DTWAIN_ERR_INI64_NOT_FOUND = (-1061);
  DTWAIN_ERR_CRC_CHECK = (-1062);
  DTWAIN_ERR_RESOURCES_BAD_VERSION = (-1063);
  DTWAIN_ERR_WIN32_ERROR = (-1064);
  DTWAIN_ERR_STRINGID_NOTFOUND = (-1065);
  DTWAIN_ERR_RESOURCES_DUPLICATEID_FOUND = (-1066);
  DTWAIN_ERR_UNAVAILABLE_EXTINFO = (-1067);
  DTWAIN_ERR_TWAINDSM2_BADBITMAP = (-1068);
  DTWAIN_ERR_ACQUISITION_CANCELED = (-1069);
  DTWAIN_ERR_IMAGE_RESAMPLED = (-1070);
  DTWAIN_ERR_UNKNOWN_TWAIN_RC = (-1071);
  DTWAIN_ERR_UNKNOWN_TWAIN_CC = (-1072);
  DTWAIN_ERR_RESOURCES_DATA_EXCEPTION = (-1073);
  DTWAIN_ERR_AUDIO_TRANSFER_NOTSUPPORTED = (-1074);
  DTWAIN_ERR_FEEDER_COMPLIANCY = (-1075);
  DTWAIN_ERR_SUPPORTEDCAPS_COMPLIANCY1 = (-1076);
  DTWAIN_ERR_SUPPORTEDCAPS_COMPLIANCY2 = (-1077);
  DTWAIN_ERR_ICAPPIXELTYPE_COMPLIANCY1 = (-1078);
  DTWAIN_ERR_ICAPPIXELTYPE_COMPLIANCY2 = (-1079);
  DTWAIN_ERR_ICAPBITDEPTH_COMPLIANCY1 = (-1080);
  DTWAIN_ERR_XFERMECH_COMPLIANCY = (-1081);
  DTWAIN_ERR_STANDARDCAPS_COMPLIANCY = (-1082);
  DTWAIN_ERR_EXTIMAGEINFO_DATATYPE_MISMATCH = (-1083);
  DTWAIN_ERR_EXTIMAGEINFO_RETRIEVAL = (-1084);
  DTWAIN_ERR_RANGE_OUTOFBOUNDS = (-1085);
  DTWAIN_ERR_RANGE_STEPISZERO = (-1086);
  DTWAIN_ERR_BLANKNAMEDETECTED = (-1087);
  DTWAIN_ERR_FEEDER_NOPAPERSENSOR = (-1088);
  TWAIN_ERR_LOW_MEMORY = (-1100);
  TWAIN_ERR_FALSE_ALARM = (-1101);
  TWAIN_ERR_BUMMER = (-1102);
  TWAIN_ERR_NODATASOURCE = (-1103);
  TWAIN_ERR_MAXCONNECTIONS = (-1104);
  TWAIN_ERR_OPERATIONERROR = (-1105);
  TWAIN_ERR_BADCAPABILITY = (-1106);
  TWAIN_ERR_BADVALUE = (-1107);
  TWAIN_ERR_BADPROTOCOL = (-1108);
  TWAIN_ERR_SEQUENCEERROR = (-1109);
  TWAIN_ERR_BADDESTINATION = (-1110);
  TWAIN_ERR_CAPNOTSUPPORTED = (-1111);
  TWAIN_ERR_CAPBADOPERATION = (-1112);
  TWAIN_ERR_CAPSEQUENCEERROR = (-1113);
  TWAIN_ERR_FILEPROTECTEDERROR = (-1114);
  TWAIN_ERR_FILEEXISTERROR = (-1115);
  TWAIN_ERR_FILENOTFOUND = (-1116);
  TWAIN_ERR_DIRNOTEMPTY = (-1117);
  TWAIN_ERR_FEEDERJAMMED = (-1118);
  TWAIN_ERR_FEEDERMULTPAGES = (-1119);
  TWAIN_ERR_FEEDERWRITEERROR = (-1120);
  TWAIN_ERR_DEVICEOFFLINE = (-1121);
  TWAIN_ERR_NULL_CONTAINER = (-1122);
  TWAIN_ERR_INTERLOCK = (-1123);
  TWAIN_ERR_DAMAGEDCORNER = (-1124);
  TWAIN_ERR_FOCUSERROR = (-1125);
  TWAIN_ERR_DOCTOOLIGHT = (-1126);
  TWAIN_ERR_DOCTOODARK = (-1127);
  TWAIN_ERR_NOMEDIA = (-1128);
  DTWAIN_ERR_FILEXFERSTART = (-2000);
  DTWAIN_ERR_MEM = (-2001);
  DTWAIN_ERR_FILEOPEN = (-2002);
  DTWAIN_ERR_FILEREAD = (-2003);
  DTWAIN_ERR_FILEWRITE = (-2004);
  DTWAIN_ERR_BADPARAM = (-2005);
  DTWAIN_ERR_INVALIDBMP = (-2006);
  DTWAIN_ERR_BMPRLE = (-2007);
  DTWAIN_ERR_RESERVED1 = (-2008);
  DTWAIN_ERR_INVALIDJPG = (-2009);
  DTWAIN_ERR_DC = (-2010);
  DTWAIN_ERR_DIB = (-2011);
  DTWAIN_ERR_RESERVED2 = (-2012);
  DTWAIN_ERR_NORESOURCE = (-2013);
  DTWAIN_ERR_CALLBACKCANCEL = (-2014);
  DTWAIN_ERR_INVALIDPNG = (-2015);
  DTWAIN_ERR_PNGCREATE = (-2016);
  DTWAIN_ERR_INTERNAL = (-2017);
  DTWAIN_ERR_FONT = (-2018);
  DTWAIN_ERR_INTTIFF = (-2019);
  DTWAIN_ERR_INVALIDTIFF = (-2020);
  DTWAIN_ERR_NOTIFFLZW = (-2021);
  DTWAIN_ERR_INVALIDPCX = (-2022);
  DTWAIN_ERR_CREATEBMP = (-2023);
  DTWAIN_ERR_NOLINES = (-2024);
  DTWAIN_ERR_GETDIB = (-2025);
  DTWAIN_ERR_NODEVOP = (-2026);
  DTWAIN_ERR_INVALIDWMF = (-2027);
  DTWAIN_ERR_DEPTHMISMATCH = (-2028);
  DTWAIN_ERR_BITBLT = (-2029);
  DTWAIN_ERR_BUFTOOSMALL = (-2030);
  DTWAIN_ERR_TOOMANYCOLORS = (-2031);
  DTWAIN_ERR_INVALIDTGA = (-2032);
  DTWAIN_ERR_NOTGATHUMBNAIL = (-2033);
  DTWAIN_ERR_RESERVED3 = (-2034);
  DTWAIN_ERR_CREATEDIB = (-2035);
  DTWAIN_ERR_NOLZW = (-2036);
  DTWAIN_ERR_SELECTOBJ = (-2037);
  DTWAIN_ERR_BADMANAGER = (-2038);
  DTWAIN_ERR_OBSOLETE = (-2039);
  DTWAIN_ERR_CREATEDIBSECTION = (-2040);
  DTWAIN_ERR_SETWINMETAFILEBITS = (-2041);
  DTWAIN_ERR_GETWINMETAFILEBITS = (-2042);
  DTWAIN_ERR_PAXPWD = (-2043);
  DTWAIN_ERR_INVALIDPAX = (-2044);
  DTWAIN_ERR_NOSUPPORT = (-2045);
  DTWAIN_ERR_INVALIDPSD = (-2046);
  DTWAIN_ERR_PSDNOTSUPPORTED = (-2047);
  DTWAIN_ERR_DECRYPT = (-2048);
  DTWAIN_ERR_ENCRYPT = (-2049);
  DTWAIN_ERR_COMPRESSION = (-2050);
  DTWAIN_ERR_DECOMPRESSION = (-2051);
  DTWAIN_ERR_INVALIDTLA = (-2052);
  DTWAIN_ERR_INVALIDWBMP = (-2053);
  DTWAIN_ERR_NOTIFFTAG = (-2054);
  DTWAIN_ERR_NOLOCALSTORAGE = (-2055);
  DTWAIN_ERR_INVALIDEXIF = (-2056);
  DTWAIN_ERR_NOEXIFSTRING = (-2057);
  DTWAIN_ERR_TIFFDLL32NOTFOUND = (-2058);
  DTWAIN_ERR_TIFFDLL16NOTFOUND = (-2059);
  DTWAIN_ERR_PNGDLL16NOTFOUND = (-2060);
  DTWAIN_ERR_JPEGDLL16NOTFOUND = (-2061);
  DTWAIN_ERR_BADBITSPERPIXEL = (-2062);
  DTWAIN_ERR_TIFFDLL32INVALIDVER = (-2063);
  DTWAIN_ERR_PDFDLL32NOTFOUND = (-2064);
  DTWAIN_ERR_PDFDLL32INVALIDVER = (-2065);
  DTWAIN_ERR_JPEGDLL32NOTFOUND = (-2066);
  DTWAIN_ERR_JPEGDLL32INVALIDVER = (-2067);
  DTWAIN_ERR_PNGDLL32NOTFOUND = (-2068);
  DTWAIN_ERR_PNGDLL32INVALIDVER = (-2069);
  DTWAIN_ERR_J2KDLL32NOTFOUND = (-2070);
  DTWAIN_ERR_J2KDLL32INVALIDVER = (-2071);
  DTWAIN_ERR_MANDUPLEX_UNAVAILABLE = (-2072);
  DTWAIN_ERR_TIMEOUT = (-2073);
  DTWAIN_ERR_INVALIDICONFORMAT = (-2074);
  DTWAIN_ERR_TWAIN32DSMNOTFOUND = (-2075);
  DTWAIN_ERR_TWAINOPENSOURCEDSMNOTFOUND = (-2076);
  DTWAIN_ERR_INVALID_DIRECTORY = (-2077);
  DTWAIN_ERR_CREATE_DIRECTORY = (-2078);
  DTWAIN_ERR_OCRLIBRARY_NOTFOUND = (-2079);
  DTWAIN_TWAINSAVE_OK = (0);
  DTWAIN_ERR_TS_FIRST = (-2080);
  DTWAIN_ERR_TS_NOFILENAME = (-2081);
  DTWAIN_ERR_TS_NOTWAINSYS = (-2082);
  DTWAIN_ERR_TS_DEVICEFAILURE = (-2083);
  DTWAIN_ERR_TS_FILESAVEERROR = (-2084);
  DTWAIN_ERR_TS_COMMANDILLEGAL = (-2085);
  DTWAIN_ERR_TS_CANCELLED = (-2086);
  DTWAIN_ERR_TS_ACQUISITIONERROR = (-2087);
  DTWAIN_ERR_TS_INVALIDCOLORSPACE = (-2088);
  DTWAIN_ERR_TS_PDFNOTSUPPORTED = (-2089);
  DTWAIN_ERR_TS_NOTAVAILABLE = (-2090);
  DTWAIN_ERR_OCR_FIRST = (-2100);
  DTWAIN_ERR_OCR_INVALIDPAGENUM = (-2101);
  DTWAIN_ERR_OCR_INVALIDENGINE = (-2102);
  DTWAIN_ERR_OCR_NOTACTIVE = (-2103);
  DTWAIN_ERR_OCR_INVALIDFILETYPE = (-2104);
  DTWAIN_ERR_OCR_INVALIDPIXELTYPE = (-2105);
  DTWAIN_ERR_OCR_INVALIDBITDEPTH = (-2106);
  DTWAIN_ERR_OCR_RECOGNITIONERROR = (-2107);
  DTWAIN_ERR_OCR_LAST = (-2108);
  DTWAIN_ERR_LAST = DTWAIN_ERR_OCR_LAST;
  DTWAIN_ERR_SOURCE_COULD_NOT_OPEN = (-2500);
  DTWAIN_ERR_SOURCE_COULD_NOT_CLOSE = (-2501);
  DTWAIN_ERR_IMAGEINFO_INVALID = (-2502);
  DTWAIN_ERR_WRITEDATA_TOFILE = (-2503);
  DTWAIN_ERR_OPERATION_NOTSUPPORTED = (-2504);
  DTWAIN_ERR_INVALID_PDFTEXTELEMENT = (-2505);
  DTWAIN_ERR_SETCAP_FAILED = (-2506);
  DTWAIN_ERR_CAP_INVALIDSTATE = (-2507);
  DTWAIN_ERR_GETCAP_FAILED = (-2508);
  DTWAIN_DE_CHKAUTOCAPTURE = 1;
  DTWAIN_DE_CHKBATTERY = 2;
  DTWAIN_DE_CHKDEVICEONLINE = 4;
  DTWAIN_DE_CHKFLASH = 8;
  DTWAIN_DE_CHKPOWERSUPPLY = 16;
  DTWAIN_DE_CHKRESOLUTION = 32;
  DTWAIN_DE_DEVICEADDED = 64;
  DTWAIN_DE_DEVICEOFFLINE = 128;
  DTWAIN_DE_DEVICEREADY = 256;
  DTWAIN_DE_DEVICEREMOVED = 512;
  DTWAIN_DE_IMAGECAPTURED = 1024;
  DTWAIN_DE_IMAGEDELETED = 2048;
  DTWAIN_DE_PAPERDOUBLEFEED = 4096;
  DTWAIN_DE_PAPERJAM = 8192;
  DTWAIN_DE_LAMPFAILURE = 16384;
  DTWAIN_DE_POWERSAVE = 32768;
  DTWAIN_DE_POWERSAVENOTIFY = 65536;
  DTWAIN_DE_CUSTOMEVENTS = $8000;
  DTWAIN_GETDE_EVENT = 0;
  DTWAIN_GETDE_DEVNAME = 1;
  DTWAIN_GETDE_BATTERYMINUTES = 2;
  DTWAIN_GETDE_BATTERYPCT = 3;
  DTWAIN_GETDE_XRESOLUTION = 4;
  DTWAIN_GETDE_YRESOLUTION = 5;
  DTWAIN_GETDE_FLASHUSED = 6;
  DTWAIN_GETDE_AUTOCAPTURE = 7;
  DTWAIN_GETDE_TIMEBEFORECAPTURE = 8;
  DTWAIN_GETDE_TIMEBETWEENCAPTURES = 9;
  DTWAIN_GETDE_POWERSUPPLY = 10;
  DTWAIN_IMPRINTERTOPBEFORE = 1;
  DTWAIN_IMPRINTERTOPAFTER = 2;
  DTWAIN_IMPRINTERBOTTOMBEFORE = 4;
  DTWAIN_IMPRINTERBOTTOMAFTER = 8;
  DTWAIN_ENDORSERTOPBEFORE = 16;
  DTWAIN_ENDORSERTOPAFTER = 32;
  DTWAIN_ENDORSERBOTTOMBEFORE = 64;
  DTWAIN_ENDORSERBOTTOMAFTER = 128;
  DTWAIN_PM_SINGLESTRING = 0;
  DTWAIN_PM_MULTISTRING = 1;
  DTWAIN_PM_COMPOUNDSTRING = 2;
  DTWAIN_TWTY_INT8 = $0000;
  DTWAIN_TWTY_INT16 = $0001;
  DTWAIN_TWTY_INT32 = $0002;
  DTWAIN_TWTY_UINT8 = $0003;
  DTWAIN_TWTY_UINT16 = $0004;
  DTWAIN_TWTY_UINT32 = $0005;
  DTWAIN_TWTY_BOOL = $0006;
  DTWAIN_TWTY_FIX32 = $0007;
  DTWAIN_TWTY_FRAME = $0008;
  DTWAIN_TWTY_STR32 = $0009;
  DTWAIN_TWTY_STR64 = $000A;
  DTWAIN_TWTY_STR128 = $000B;
  DTWAIN_TWTY_STR255 = $000C;
  DTWAIN_TWTY_STR1024 = $000D;
  DTWAIN_TWTY_UNI512 = $000E;
  DTWAIN_EI_BARCODEX = $1200;
  DTWAIN_EI_BARCODEY = $1201;
  DTWAIN_EI_BARCODETEXT = $1202;
  DTWAIN_EI_BARCODETYPE = $1203;
  DTWAIN_EI_DESHADETOP = $1204;
  DTWAIN_EI_DESHADELEFT = $1205;
  DTWAIN_EI_DESHADEHEIGHT = $1206;
  DTWAIN_EI_DESHADEWIDTH = $1207;
  DTWAIN_EI_DESHADESIZE = $1208;
  DTWAIN_EI_SPECKLESREMOVED = $1209;
  DTWAIN_EI_HORZLINEXCOORD = $120A;
  DTWAIN_EI_HORZLINEYCOORD = $120B;
  DTWAIN_EI_HORZLINELENGTH = $120C;
  DTWAIN_EI_HORZLINETHICKNESS = $120D;
  DTWAIN_EI_VERTLINEXCOORD = $120E;
  DTWAIN_EI_VERTLINEYCOORD = $120F;
  DTWAIN_EI_VERTLINELENGTH = $1210;
  DTWAIN_EI_VERTLINETHICKNESS = $1211;
  DTWAIN_EI_PATCHCODE = $1212;
  DTWAIN_EI_ENDORSEDTEXT = $1213;
  DTWAIN_EI_FORMCONFIDENCE = $1214;
  DTWAIN_EI_FORMTEMPLATEMATCH = $1215;
  DTWAIN_EI_FORMTEMPLATEPAGEMATCH = $1216;
  DTWAIN_EI_FORMHORZDOCOFFSET = $1217;
  DTWAIN_EI_FORMVERTDOCOFFSET = $1218;
  DTWAIN_EI_BARCODECOUNT = $1219;
  DTWAIN_EI_BARCODECONFIDENCE = $121A;
  DTWAIN_EI_BARCODEROTATION = $121B;
  DTWAIN_EI_BARCODETEXTLENGTH = $121C;
  DTWAIN_EI_DESHADECOUNT = $121D;
  DTWAIN_EI_DESHADEBLACKCOUNTOLD = $121E;
  DTWAIN_EI_DESHADEBLACKCOUNTNEW = $121F;
  DTWAIN_EI_DESHADEBLACKRLMIN = $1220;
  DTWAIN_EI_DESHADEBLACKRLMAX = $1221;
  DTWAIN_EI_DESHADEWHITECOUNTOLD = $1222;
  DTWAIN_EI_DESHADEWHITECOUNTNEW = $1223;
  DTWAIN_EI_DESHADEWHITERLMIN = $1224;
  DTWAIN_EI_DESHADEWHITERLAVE = $1225;
  DTWAIN_EI_DESHADEWHITERLMAX = $1226;
  DTWAIN_EI_BLACKSPECKLESREMOVED = $1227;
  DTWAIN_EI_WHITESPECKLESREMOVED = $1228;
  DTWAIN_EI_HORZLINECOUNT = $1229;
  DTWAIN_EI_VERTLINECOUNT = $122A;
  DTWAIN_EI_DESKEWSTATUS = $122B;
  DTWAIN_EI_SKEWORIGINALANGLE = $122C;
  DTWAIN_EI_SKEWFINALANGLE = $122D;
  DTWAIN_EI_SKEWCONFIDENCE = $122E;
  DTWAIN_EI_SKEWWINDOWX1 = $122F;
  DTWAIN_EI_SKEWWINDOWY1 = $1230;
  DTWAIN_EI_SKEWWINDOWX2 = $1231;
  DTWAIN_EI_SKEWWINDOWY2 = $1232;
  DTWAIN_EI_SKEWWINDOWX3 = $1233;
  DTWAIN_EI_SKEWWINDOWY3 = $1234;
  DTWAIN_EI_SKEWWINDOWX4 = $1235;
  DTWAIN_EI_SKEWWINDOWY4 = $1236;
  DTWAIN_EI_BOOKNAME = $1238;
  DTWAIN_EI_CHAPTERNUMBER = $1239;
  DTWAIN_EI_DOCUMENTNUMBER = $123A;
  DTWAIN_EI_PAGENUMBER = $123B;
  DTWAIN_EI_CAMERA = $123C;
  DTWAIN_EI_FRAMENUMBER = $123D;
  DTWAIN_EI_FRAME = $123E;
  DTWAIN_EI_PIXELFLAVOR = $123F;
  DTWAIN_EI_ICCPROFILE = $1240;
  DTWAIN_EI_LASTSEGMENT = $1241;
  DTWAIN_EI_SEGMENTNUMBER = $1242;
  DTWAIN_EI_MAGDATA = $1243;
  DTWAIN_EI_MAGTYPE = $1244;
  DTWAIN_EI_PAGESIDE = $1245;
  DTWAIN_EI_FILESYSTEMSOURCE = $1246;
  DTWAIN_EI_IMAGEMERGED = $1247;
  DTWAIN_EI_MAGDATALENGTH = $1248;
  DTWAIN_EI_PAPERCOUNT = $1249;
  DTWAIN_EI_PRINTERTEXT = $124A;
  DTWAIN_EI_TWAINDIRECTMETADATA = $124B;
  DTWAIN_EI_IAFIELDA_VALUE = $124C;
  DTWAIN_EI_IAFIELDB_VALUE = $124D;
  DTWAIN_EI_IAFIELDC_VALUE = $124E;
  DTWAIN_EI_IAFIELDD_VALUE = $124F;
  DTWAIN_EI_IAFIELDE_VALUE = $1250;
  DTWAIN_EI_IALEVEL = $1251;
  DTWAIN_EI_PRINTER = $1252;
  DTWAIN_EI_BARCODETEXT2 = $1253;
  DTWAIN_LOG_DECODE_SOURCE = $1;
  DTWAIN_LOG_DECODE_DEST = $2;
  DTWAIN_LOG_DECODE_TWMEMREF = $4;
  DTWAIN_LOG_DECODE_TWEVENT = $8;
  DTWAIN_LOG_CALLSTACK = $10;
  DTWAIN_LOG_ISTWAINMSG = $20;
  DTWAIN_LOG_INITFAILURE = $40;
  DTWAIN_LOG_LOWLEVELTWAIN = $80;
  DTWAIN_LOG_DECODE_BITMAP = $100;
  DTWAIN_LOG_NOTIFICATIONS = $200;
  DTWAIN_LOG_MISCELLANEOUS = $400;
  DTWAIN_LOG_DTWAINERRORS = $800;
  DTWAIN_LOG_USEFILE = $10000;
  DTWAIN_LOG_SHOWEXCEPTIONS = $20000;
  DTWAIN_LOG_ERRORMSGBOX = $40000;
  DTWAIN_LOG_USEBUFFER = $80000;
  DTWAIN_LOG_FILEAPPEND = $100000;
  DTWAIN_LOG_USECALLBACK = $200000;
  DTWAIN_LOG_USECRLF = $400000;
  DTWAIN_LOG_CONSOLE = $800000;
  DTWAIN_LOG_DEBUGMONITOR = $1000000;
  DTWAIN_LOG_USEWINDOW = $2000000;
  DTWAIN_LOG_CREATEDIRECTORY = $04000000;
  DTWAIN_LOG_CONSOLEWITHHANDLER = ($08000000 Or DTWAIN_LOG_CONSOLE);
  DTWAIN_LOG_ALL = (DTWAIN_LOG_DECODE_SOURCE Or DTWAIN_LOG_DECODE_DEST Or DTWAIN_LOG_DECODE_TWEVENT Or DTWAIN_LOG_DECODE_TWMEMREF Or DTWAIN_LOG_CALLSTACK Or DTWAIN_LOG_ISTWAINMSG Or DTWAIN_LOG_INITFAILURE Or DTWAIN_LOG_LOWLEVELTWAIN Or DTWAIN_LOG_NOTIFICATIONS Or DTWAIN_LOG_MISCELLANEOUS Or DTWAIN_LOG_DTWAINERRORS Or DTWAIN_LOG_DECODE_BITMAP);
  DTWAIN_LOG_ALL_APPEND = $FFFFFFFF;
  DTWAIN_TEMPDIR_CREATEDIRECTORY = DTWAIN_LOG_CREATEDIRECTORY;
  DTWAINGCD_RETURNHANDLE = 1;
  DTWAINGCD_COPYDATA = 2;
  DTWAIN_BYPOSITION = 0;
  DTWAIN_BYID = 1;
  DTWAINSCD_USEHANDLE = 1;
  DTWAINSCD_USEDATA = 2;
  DTWAIN_PAGEFAIL_RETRY = 1;
  DTWAIN_PAGEFAIL_TERMINATE = 2;
  DTWAIN_MAXRETRY_ATTEMPTS = 3;
  DTWAIN_RETRY_FOREVER = (-1);
  DTWAIN_PDF_NOSCALING = 128;
  DTWAIN_PDF_FITPAGE = 256;
  DTWAIN_PDF_VARIABLEPAGESIZE = 512;
  DTWAIN_PDF_CUSTOMSIZE = 1024;
  DTWAIN_PDF_USECOMPRESSION = 2048;
  DTWAIN_PDF_CUSTOMSCALE = 4096;
  DTWAIN_PDF_PIXELSPERMETERSIZE = 8192;
  DTWAIN_PDF_ALLOWPRINTING = 2052;
  DTWAIN_PDF_ALLOWMOD = 8;
  DTWAIN_PDF_ALLOWCOPY = 16;
  DTWAIN_PDF_ALLOWMODANNOTATIONS = 32;
  DTWAIN_PDF_ALLOWFILLIN = 256;
  DTWAIN_PDF_ALLOWEXTRACTION = 512;
  DTWAIN_PDF_ALLOWASSEMBLY = 1024;
  DTWAIN_PDF_ALLOWDEGRADEDPRINTING = 4;
  DTWAIN_PDF_ALLOWALL = $FFFFFFFC;
  DTWAIN_PDF_ALLOWANYMOD = (DTWAIN_PDF_ALLOWMOD Or DTWAIN_PDF_ALLOWFILLIN Or DTWAIN_PDF_ALLOWMODANNOTATIONS Or DTWAIN_PDF_ALLOWASSEMBLY);
  DTWAIN_PDF_ALLOWANYPRINTING = (DTWAIN_PDF_ALLOWPRINTING Or DTWAIN_PDF_ALLOWDEGRADEDPRINTING);
  DTWAIN_PDF_PORTRAIT = 0;
  DTWAIN_PDF_LANDSCAPE = 1;
  DTWAIN_PS_REGULAR = 0;
  DTWAIN_PS_ENCAPSULATED = 1;
  DTWAIN_BP_AUTODISCARD_NONE = 0;
  DTWAIN_BP_AUTODISCARD_IMMEDIATE = 1;
  DTWAIN_BP_AUTODISCARD_AFTERPROCESS = 2;
  DTWAIN_BP_DETECTORIGINAL = 1;
  DTWAIN_BP_DETECTADJUSTED = 2;
  DTWAIN_BP_DETECTALL = (DTWAIN_BP_DETECTORIGINAL Or DTWAIN_BP_DETECTADJUSTED);
  DTWAIN_BP_DISABLE = (-2);
  DTWAIN_BP_AUTO = (-1);
  DTWAIN_BP_AUTODISCARD_ANY = $FFFF;
  DTWAIN_LP_REFLECTIVE = 0;
  DTWAIN_LP_TRANSMISSIVE = 1;
  DTWAIN_LS_RED = 0;
  DTWAIN_LS_GREEN = 1;
  DTWAIN_LS_BLUE = 2;
  DTWAIN_LS_NONE = 3;
  DTWAIN_LS_WHITE = 4;
  DTWAIN_LS_UV = 5;
  DTWAIN_LS_IR = 6;
  DTWAIN_DLG_SORTNAMES = 1;
  DTWAIN_DLG_CENTER = 2;
  DTWAIN_DLG_CENTER_SCREEN = 4;
  DTWAIN_DLG_USETEMPLATE = 8;
  DTWAIN_DLG_CLEAR_PARAMS = 16;
  DTWAIN_DLG_HORIZONTALSCROLL = 32;
  DTWAIN_DLG_USEINCLUDENAMES = 64;
  DTWAIN_DLG_USEEXCLUDENAMES = 128;
  DTWAIN_DLG_USENAMEMAPPING = 256;
  DTWAIN_DLG_TOPMOSTWINDOW = 1024;
  DTWAIN_DLG_OPENONSELECT = 2048;
  DTWAIN_DLG_NOOPENONSELECT = 4096;
  DTWAIN_DLG_HIGHLIGHTFIRST = 8192;
  DTWAIN_DLG_SAVELASTSCREENPOS = 16384;
  DTWAIN_DLG_CENTER_CURRENT_MONITOR = 32768;
  DTWAIN_DLG_CONSOLEASPARENT = 65536;
  DTWAIN_RES_ENGLISH = 0;
  DTWAIN_RES_FRENCH = 1;
  DTWAIN_RES_SPANISH = 2;
  DTWAIN_RES_DUTCH = 3;
  DTWAIN_RES_GERMAN = 4;
  DTWAIN_RES_ITALIAN = 5;
  DTWAIN_AL_ALARM = 0;
  DTWAIN_AL_FEEDERERROR = 1;
  DTWAIN_AL_FEEDERWARNING = 2;
  DTWAIN_AL_BARCODE = 3;
  DTWAIN_AL_DOUBLEFEED = 4;
  DTWAIN_AL_JAM = 5;
  DTWAIN_AL_PATCHCODE = 6;
  DTWAIN_AL_POWER = 7;
  DTWAIN_AL_SKEW = 8;
  DTWAIN_FT_CAMERA = 0;
  DTWAIN_FT_CAMERATOP = 1;
  DTWAIN_FT_CAMERABOTTOM = 2;
  DTWAIN_FT_CAMERAPREVIEW = 3;
  DTWAIN_FT_DOMAIN = 4;
  DTWAIN_FT_HOST = 5;
  DTWAIN_FT_DIRECTORY = 6;
  DTWAIN_FT_IMAGE = 7;
  DTWAIN_FT_UNKNOWN = 8;
  DTWAIN_NF_NONE = 0;
  DTWAIN_NF_AUTO = 1;
  DTWAIN_NF_LONEPIXEL = 2;
  DTWAIN_NF_MAJORITYRULE = 3;
  DTWAIN_CB_AUTO = 0;
  DTWAIN_CB_CLEAR = 1;
  DTWAIN_CB_NOCLEAR = 2;
  DTWAIN_FA_NONE = 0;
  DTWAIN_FA_LEFT = 1;
  DTWAIN_FA_CENTER = 2;
  DTWAIN_FA_RIGHT = 3;
  DTWAIN_PF_CHOCOLATE = 0;
  DTWAIN_PF_VANILLA = 1;
  DTWAIN_FO_FIRSTPAGEFIRST = 0;
  DTWAIN_FO_LASTPAGEFIRST = 1;
  DTWAIN_INCREMENT_STATIC = 0;
  DTWAIN_INCREMENT_DYNAMIC = 1;
  DTWAIN_INCREMENT_DEFAULT = -1;
  DTWAIN_MANDUP_FACEUPTOPPAGE = 0;
  DTWAIN_MANDUP_FACEUPBOTTOMPAGE = 1;
  DTWAIN_MANDUP_FACEDOWNTOPPAGE = 2;
  DTWAIN_MANDUP_FACEDOWNBOTTOMPAGE = 3;
  DTWAIN_FILESAVE_DEFAULT = 0;
  DTWAIN_FILESAVE_UICLOSE = 1;
  DTWAIN_FILESAVE_SOURCECLOSE = 2;
  DTWAIN_FILESAVE_ENDACQUIRE = 3;
  DTWAIN_FILESAVE_MANUALSAVE = 4;
  DTWAIN_FILESAVE_SAVEINCOMPLETE = 128;
  DTWAIN_MANDUP_SCANOK = 1;
  DTWAIN_MANDUP_SIDE1RESCAN = 2;
  DTWAIN_MANDUP_SIDE2RESCAN = 3;
  DTWAIN_MANDUP_RESCANALL = 4;
  DTWAIN_MANDUP_PAGEMISSING = 5;
  DTWAIN_DEMODLL_VERSION = $00000001;
  DTWAIN_UNLICENSED_VERSION = $00000002;
  DTWAIN_COMPANY_VERSION = $00000004;
  DTWAIN_GENERAL_VERSION = $00000008;
  DTWAIN_DEVELOP_VERSION = $00000010;
  DTWAIN_JAVA_VERSION = $00000020;
  DTWAIN_TOOLKIT_VERSION = $00000040;
  DTWAIN_LIMITEDDLL_VERSION = $00000080;
  DTWAIN_STATICLIB_VERSION = $00000100;
  DTWAIN_STATICLIB_STDCALL_VERSION = $00000200;
  DTWAIN_PDF_VERSION = $00010000;
  DTWAIN_TWAINSAVE_VERSION = $00020000;
  DTWAIN_OCR_VERSION = $00040000;
  DTWAIN_BARCODE_VERSION = $00080000;
  DTWAIN_ACTIVEX_VERSION = $00100000;
  DTWAIN_32BIT_VERSION = $00200000;
  DTWAIN_64BIT_VERSION = $00400000;
  DTWAIN_UNICODE_VERSION = $00800000;
  DTWAIN_OPENSOURCE_VERSION = $01000000;
  DTWAIN_CALLSTACK_LOGGING = $02000000;
  DTWAIN_CALLSTACK_LOGGING_PLUS = $04000000;
  DTWAINOCR_RETURNHANDLE = 1;
  DTWAINOCR_COPYDATA = 2;
  DTWAIN_OCRINFO_CHAR = 0;
  DTWAIN_OCRINFO_CHARXPOS = 1;
  DTWAIN_OCRINFO_CHARYPOS = 2;
  DTWAIN_OCRINFO_CHARXWIDTH = 3;
  DTWAIN_OCRINFO_CHARYWIDTH = 4;
  DTWAIN_OCRINFO_CHARCONFIDENCE = 5;
  DTWAIN_OCRINFO_PAGENUM = 6;
  DTWAIN_OCRINFO_OCRENGINE = 7;
  DTWAIN_OCRINFO_TEXTLENGTH = 8;
  DTWAIN_PDFPAGETYPE_COLOR = 0;
  DTWAIN_PDFPAGETYPE_BW = 1;
  DTWAIN_TWAINDSM_LEGACY = 1;
  DTWAIN_TWAINDSM_VERSION2 = 2;
  DTWAIN_TWAINDSM_LATESTVERSION = 4;
  DTWAIN_TWAINDSMSEARCH_NOTFOUND = (-1);
  DTWAIN_TWAINDSMSEARCH_WSO = 0;
  DTWAIN_TWAINDSMSEARCH_WOS = 1;
  DTWAIN_TWAINDSMSEARCH_SWO = 2;
  DTWAIN_TWAINDSMSEARCH_SOW = 3;
  DTWAIN_TWAINDSMSEARCH_OWS = 4;
  DTWAIN_TWAINDSMSEARCH_OSW = 5;
  DTWAIN_TWAINDSMSEARCH_W = 6;
  DTWAIN_TWAINDSMSEARCH_S = 7;
  DTWAIN_TWAINDSMSEARCH_O = 8;
  DTWAIN_TWAINDSMSEARCH_WS = 9;
  DTWAIN_TWAINDSMSEARCH_WO = 10;
  DTWAIN_TWAINDSMSEARCH_SW = 11;
  DTWAIN_TWAINDSMSEARCH_SO = 12;
  DTWAIN_TWAINDSMSEARCH_OW = 13;
  DTWAIN_TWAINDSMSEARCH_OS = 14;
  DTWAIN_TWAINDSMSEARCH_C = 15;
  DTWAIN_TWAINDSMSEARCH_U = 16;
  DTWAIN_PDFPOLARITY_POSITIVE = 1;
  DTWAIN_PDFPOLARITY_NEGATIVE = 2;
  DTWAIN_TWPF_NORMAL = 0;
  DTWAIN_TWPF_BOLD = 1;
  DTWAIN_TWPF_ITALIC = 2;
  DTWAIN_TWPF_LARGESIZE = 3;
  DTWAIN_TWPF_SMALLSIZE = 4;
  DTWAIN_TWCT_PAGE = 0;
  DTWAIN_TWCT_PATCH1 = 1;
  DTWAIN_TWCT_PATCH2 = 2;
  DTWAIN_TWCT_PATCH3 = 3;
  DTWAIN_TWCT_PATCH4 = 4;
  DTWAIN_TWCT_PATCH5 = 5;
  DTWAIN_TWCT_PATCH6 = 6;
  DTWAIN_AUTOSIZE_NONE = 0;
  DTWAIN_CV_CAPCUSTOMBASE = $8000;
  DTWAIN_CV_CAPXFERCOUNT = $0001;
  DTWAIN_CV_ICAPCOMPRESSION = $0100;
  DTWAIN_CV_ICAPPIXELTYPE = $0101;
  DTWAIN_CV_ICAPUNITS = $0102;
  DTWAIN_CV_ICAPXFERMECH = $0103;
  DTWAIN_CV_CAPAUTHOR = $1000;
  DTWAIN_CV_CAPCAPTION = $1001;
  DTWAIN_CV_CAPFEEDERENABLED = $1002;
  DTWAIN_CV_CAPFEEDERLOADED = $1003;
  DTWAIN_CV_CAPTIMEDATE = $1004;
  DTWAIN_CV_CAPSUPPORTEDCAPS = $1005;
  DTWAIN_CV_CAPEXTENDEDCAPS = $1006;
  DTWAIN_CV_CAPAUTOFEED = $1007;
  DTWAIN_CV_CAPCLEARPAGE = $1008;
  DTWAIN_CV_CAPFEEDPAGE = $1009;
  DTWAIN_CV_CAPREWINDPAGE = $100a;
  DTWAIN_CV_CAPINDICATORS = $100b;
  DTWAIN_CV_CAPSUPPORTEDCAPSEXT = $100c;
  DTWAIN_CV_CAPPAPERDETECTABLE = $100d;
  DTWAIN_CV_CAPUICONTROLLABLE = $100e;
  DTWAIN_CV_CAPDEVICEONLINE = $100f;
  DTWAIN_CV_CAPAUTOSCAN = $1010;
  DTWAIN_CV_CAPTHUMBNAILSENABLED = $1011;
  DTWAIN_CV_CAPDUPLEX = $1012;
  DTWAIN_CV_CAPDUPLEXENABLED = $1013;
  DTWAIN_CV_CAPENABLEDSUIONLY = $1014;
  DTWAIN_CV_CAPCUSTOMDSDATA = $1015;
  DTWAIN_CV_CAPENDORSER = $1016;
  DTWAIN_CV_CAPJOBCONTROL = $1017;
  DTWAIN_CV_CAPALARMS = $1018;
  DTWAIN_CV_CAPALARMVOLUME = $1019;
  DTWAIN_CV_CAPAUTOMATICCAPTURE = $101a;
  DTWAIN_CV_CAPTIMEBEFOREFIRSTCAPTURE = $101b;
  DTWAIN_CV_CAPTIMEBETWEENCAPTURES = $101c;
  DTWAIN_CV_CAPCLEARBUFFERS = $101d;
  DTWAIN_CV_CAPMAXBATCHBUFFERS = $101e;
  DTWAIN_CV_CAPDEVICETIMEDATE = $101f;
  DTWAIN_CV_CAPPOWERSUPPLY = $1020;
  DTWAIN_CV_CAPCAMERAPREVIEWUI = $1021;
  DTWAIN_CV_CAPDEVICEEVENT = $1022;
  DTWAIN_CV_CAPPAGEMULTIPLEACQUIRE = $1023;
  DTWAIN_CV_CAPSERIALNUMBER = $1024;
  DTWAIN_CV_CAPFILESYSTEM = $1025;
  DTWAIN_CV_CAPPRINTER = $1026;
  DTWAIN_CV_CAPPRINTERENABLED = $1027;
  DTWAIN_CV_CAPPRINTERINDEX = $1028;
  DTWAIN_CV_CAPPRINTERMODE = $1029;
  DTWAIN_CV_CAPPRINTERSTRING = $102a;
  DTWAIN_CV_CAPPRINTERSUFFIX = $102b;
  DTWAIN_CV_CAPLANGUAGE = $102c;
  DTWAIN_CV_CAPFEEDERALIGNMENT = $102d;
  DTWAIN_CV_CAPFEEDERORDER = $102e;
  DTWAIN_CV_CAPPAPERBINDING = $102f;
  DTWAIN_CV_CAPREACQUIREALLOWED = $1030;
  DTWAIN_CV_CAPPASSTHRU = $1031;
  DTWAIN_CV_CAPBATTERYMINUTES = $1032;
  DTWAIN_CV_CAPBATTERYPERCENTAGE = $1033;
  DTWAIN_CV_CAPPOWERDOWNTIME = $1034;
  DTWAIN_CV_CAPSEGMENTED = $1035;
  DTWAIN_CV_CAPCAMERAENABLED = $1036;
  DTWAIN_CV_CAPCAMERAORDER = $1037;
  DTWAIN_CV_CAPMICRENABLED = $1038;
  DTWAIN_CV_CAPFEEDERPREP = $1039;
  DTWAIN_CV_CAPFEEDERPOCKET = $103a;
  DTWAIN_CV_CAPAUTOMATICSENSEMEDIUM = $103b;
  DTWAIN_CV_CAPCUSTOMINTERFACEGUID = $103c;
  DTWAIN_CV_CAPSUPPORTEDCAPSSEGMENTUNIQUE = $103d;
  DTWAIN_CV_CAPSUPPORTEDDATS = $103e;
  DTWAIN_CV_CAPDOUBLEFEEDDETECTION = $103f;
  DTWAIN_CV_CAPDOUBLEFEEDDETECTIONLENGTH = $1040;
  DTWAIN_CV_CAPDOUBLEFEEDDETECTIONSENSITIVITY = $1041;
  DTWAIN_CV_CAPDOUBLEFEEDDETECTIONRESPONSE = $1042;
  DTWAIN_CV_CAPPAPERHANDLING = $1043;
  DTWAIN_CV_CAPINDICATORSMODE = $1044;
  DTWAIN_CV_CAPPRINTERVERTICALOFFSET = $1045;
  DTWAIN_CV_CAPPOWERSAVETIME = $1046;
  DTWAIN_CV_CAPPRINTERCHARROTATION = $1047;
  DTWAIN_CV_CAPPRINTERFONTSTYLE = $1048;
  DTWAIN_CV_CAPPRINTERINDEXLEADCHAR = $1049;
  DTWAIN_CV_CAPIMAGEADDRESSENABLED = $1050;
  DTWAIN_CV_CAPIAFIELDA_LEVEL = $1051;
  DTWAIN_CV_CAPIAFIELDB_LEVEL = $1052;
  DTWAIN_CV_CAPIAFIELDC_LEVEL = $1053;
  DTWAIN_CV_CAPIAFIELDD_LEVEL = $1054;
  DTWAIN_CV_CAPIAFIELDE_LEVEL = $1055;
  DTWAIN_CV_CAPIAFIELDA_PRINTFORMAT = $1056;
  DTWAIN_CV_CAPIAFIELDB_PRINTFORMAT = $1057;
  DTWAIN_CV_CAPIAFIELDC_PRINTFORMAT = $1058;
  DTWAIN_CV_CAPIAFIELDD_PRINTFORMAT = $1059;
  DTWAIN_CV_CAPIAFIELDE_PRINTFORMAT = $105A;
  DTWAIN_CV_CAPIAFIELDA_VALUE = $105B;
  DTWAIN_CV_CAPIAFIELDB_VALUE = $105C;
  DTWAIN_CV_CAPIAFIELDC_VALUE = $105D;
  DTWAIN_CV_CAPIAFIELDD_VALUE = $105E;
  DTWAIN_CV_CAPIAFIELDE_VALUE = $105F;
  DTWAIN_CV_CAPIAFIELDA_LASTPAGE = $1060;
  DTWAIN_CV_CAPIAFIELDB_LASTPAGE = $1061;
  DTWAIN_CV_CAPIAFIELDC_LASTPAGE = $1062;
  DTWAIN_CV_CAPIAFIELDD_LASTPAGE = $1063;
  DTWAIN_CV_CAPIAFIELDE_LASTPAGE = $1064;
  DTWAIN_CV_CAPPRINTERINDEXMAXVALUE = $104A;
  DTWAIN_CV_CAPPRINTERINDEXNUMDIGITS = $104B;
  DTWAIN_CV_CAPPRINTERINDEXSTEP = $104C;
  DTWAIN_CV_CAPPRINTERINDEXTRIGGER = $104D;
  DTWAIN_CV_CAPPRINTERSTRINGPREVIEW = $104E;
  DTWAIN_CV_ICAPAUTOBRIGHT = $1100;
  DTWAIN_CV_ICAPBRIGHTNESS = $1101;
  DTWAIN_CV_ICAPCONTRAST = $1103;
  DTWAIN_CV_ICAPCUSTHALFTONE = $1104;
  DTWAIN_CV_ICAPEXPOSURETIME = $1105;
  DTWAIN_CV_ICAPFILTER = $1106;
  DTWAIN_CV_ICAPFLASHUSED = $1107;
  DTWAIN_CV_ICAPGAMMA = $1108;
  DTWAIN_CV_ICAPHALFTONES = $1109;
  DTWAIN_CV_ICAPHIGHLIGHT = $110a;
  DTWAIN_CV_ICAPIMAGEFILEFORMAT = $110c;
  DTWAIN_CV_ICAPLAMPSTATE = $110d;
  DTWAIN_CV_ICAPLIGHTSOURCE = $110e;
  DTWAIN_CV_ICAPORIENTATION = $1110;
  DTWAIN_CV_ICAPPHYSICALWIDTH = $1111;
  DTWAIN_CV_ICAPPHYSICALHEIGHT = $1112;
  DTWAIN_CV_ICAPSHADOW = $1113;
  DTWAIN_CV_ICAPFRAMES = $1114;
  DTWAIN_CV_ICAPXNATIVERESOLUTION = $1116;
  DTWAIN_CV_ICAPYNATIVERESOLUTION = $1117;
  DTWAIN_CV_ICAPXRESOLUTION = $1118;
  DTWAIN_CV_ICAPYRESOLUTION = $1119;
  DTWAIN_CV_ICAPMAXFRAMES = $111a;
  DTWAIN_CV_ICAPTILES = $111b;
  DTWAIN_CV_ICAPBITORDER = $111c;
  DTWAIN_CV_ICAPCCITTKFACTOR = $111d;
  DTWAIN_CV_ICAPLIGHTPATH = $111e;
  DTWAIN_CV_ICAPPIXELFLAVOR = $111f;
  DTWAIN_CV_ICAPPLANARCHUNKY = $1120;
  DTWAIN_CV_ICAPROTATION = $1121;
  DTWAIN_CV_ICAPSUPPORTEDSIZES = $1122;
  DTWAIN_CV_ICAPTHRESHOLD = $1123;
  DTWAIN_CV_ICAPXSCALING = $1124;
  DTWAIN_CV_ICAPYSCALING = $1125;
  DTWAIN_CV_ICAPBITORDERCODES = $1126;
  DTWAIN_CV_ICAPPIXELFLAVORCODES = $1127;
  DTWAIN_CV_ICAPJPEGPIXELTYPE = $1128;
  DTWAIN_CV_ICAPTIMEFILL = $112a;
  DTWAIN_CV_ICAPBITDEPTH = $112b;
  DTWAIN_CV_ICAPBITDEPTHREDUCTION = $112c;
  DTWAIN_CV_ICAPUNDEFINEDIMAGESIZE = $112d;
  DTWAIN_CV_ICAPIMAGEDATASET = $112e;
  DTWAIN_CV_ICAPEXTIMAGEINFO = $112f;
  DTWAIN_CV_ICAPMINIMUMHEIGHT = $1130;
  DTWAIN_CV_ICAPMINIMUMWIDTH = $1131;
  DTWAIN_CV_ICAPAUTOBORDERDETECTION = $1132;
  DTWAIN_CV_ICAPAUTODESKEW = $1133;
  DTWAIN_CV_ICAPAUTODISCARDBLANKPAGES = $1134;
  DTWAIN_CV_ICAPAUTOROTATE = $1135;
  DTWAIN_CV_ICAPFLIPROTATION = $1136;
  DTWAIN_CV_ICAPBARCODEDETECTIONENABLED = $1137;
  DTWAIN_CV_ICAPSUPPORTEDBARCODETYPES = $1138;
  DTWAIN_CV_ICAPBARCODEMAXSEARCHPRIORITIES = $1139;
  DTWAIN_CV_ICAPBARCODESEARCHPRIORITIES = $113a;
  DTWAIN_CV_ICAPBARCODESEARCHMODE = $113b;
  DTWAIN_CV_ICAPBARCODEMAXRETRIES = $113c;
  DTWAIN_CV_ICAPBARCODETIMEOUT = $113d;
  DTWAIN_CV_ICAPZOOMFACTOR = $113e;
  DTWAIN_CV_ICAPPATCHCODEDETECTIONENABLED = $113f;
  DTWAIN_CV_ICAPSUPPORTEDPATCHCODETYPES = $1140;
  DTWAIN_CV_ICAPPATCHCODEMAXSEARCHPRIORITIES = $1141;
  DTWAIN_CV_ICAPPATCHCODESEARCHPRIORITIES = $1142;
  DTWAIN_CV_ICAPPATCHCODESEARCHMODE = $1143;
  DTWAIN_CV_ICAPPATCHCODEMAXRETRIES = $1144;
  DTWAIN_CV_ICAPPATCHCODETIMEOUT = $1145;
  DTWAIN_CV_ICAPFLASHUSED2 = $1146;
  DTWAIN_CV_ICAPIMAGEFILTER = $1147;
  DTWAIN_CV_ICAPNOISEFILTER = $1148;
  DTWAIN_CV_ICAPOVERSCAN = $1149;
  DTWAIN_CV_ICAPAUTOMATICBORDERDETECTION = $1150;
  DTWAIN_CV_ICAPAUTOMATICDESKEW = $1151;
  DTWAIN_CV_ICAPAUTOMATICROTATE = $1152;
  DTWAIN_CV_ICAPJPEGQUALITY = $1153;
  DTWAIN_CV_ICAPFEEDERTYPE = $1154;
  DTWAIN_CV_ICAPICCPROFILE = $1155;
  DTWAIN_CV_ICAPAUTOSIZE = $1156;
  DTWAIN_CV_ICAPAUTOMATICCROPUSESFRAME = $1157;
  DTWAIN_CV_ICAPAUTOMATICLENGTHDETECTION = $1158;
  DTWAIN_CV_ICAPAUTOMATICCOLORENABLED = $1159;
  DTWAIN_CV_ICAPAUTOMATICCOLORNONCOLORPIXELTYPE = $115a;
  DTWAIN_CV_ICAPCOLORMANAGEMENTENABLED = $115b;
  DTWAIN_CV_ICAPIMAGEMERGE = $115c;
  DTWAIN_CV_ICAPIMAGEMERGEHEIGHTTHRESHOLD = $115d;
  DTWAIN_CV_ICAPSUPPORTEDEXTIMAGEINFO = $115e;
  DTWAIN_CV_ICAPFILMTYPE = $115f;
  DTWAIN_CV_ICAPMIRROR = $1160;
  DTWAIN_CV_ICAPJPEGSUBSAMPLING = $1161;
  DTWAIN_CV_ACAPAUDIOFILEFORMAT = $1201;
  DTWAIN_CV_ACAPXFERMECH = $1202;
  DTWAIN_CFMCV_CAPCFMSTART = 2048;
  DTWAIN_CFMCV_CAPDUPLEXSCANNER = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+10);
  DTWAIN_CFMCV_CAPDUPLEXENABLE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+11);
  DTWAIN_CFMCV_CAPSCANNERNAME = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+12);
  DTWAIN_CFMCV_CAPSINGLEPASS = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+13);
  DTWAIN_CFMCV_CAPERRHANDLING = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+20);
  DTWAIN_CFMCV_CAPFEEDERSTATUS = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+21);
  DTWAIN_CFMCV_CAPFEEDMEDIUMWAIT = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+22);
  DTWAIN_CFMCV_CAPFEEDWAITTIME = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+23);
  DTWAIN_CFMCV_ICAPWHITEBALANCE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+24);
  DTWAIN_CFMCV_ICAPAUTOBINARY = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+25);
  DTWAIN_CFMCV_ICAPIMAGESEPARATION = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+26);
  DTWAIN_CFMCV_ICAPHARDWARECOMPRESSION = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+27);
  DTWAIN_CFMCV_ICAPIMAGEEMPHASIS = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+28);
  DTWAIN_CFMCV_ICAPOUTLINING = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+29);
  DTWAIN_CFMCV_ICAPDYNTHRESHOLD = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+30);
  DTWAIN_CFMCV_ICAPVARIANCE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+31);
  DTWAIN_CFMCV_CAPENDORSERAVAILABLE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+32);
  DTWAIN_CFMCV_CAPENDORSERENABLE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+33);
  DTWAIN_CFMCV_CAPENDORSERCHARSET = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+34);
  DTWAIN_CFMCV_CAPENDORSERSTRINGLENGTH = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+35);
  DTWAIN_CFMCV_CAPENDORSERSTRING = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+36);
  DTWAIN_CFMCV_ICAPDYNTHRESHOLDCURVE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+48);
  DTWAIN_CFMCV_ICAPSMOOTHINGMODE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+49);
  DTWAIN_CFMCV_ICAPFILTERMODE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+50);
  DTWAIN_CFMCV_ICAPGRADATION = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+51);
  DTWAIN_CFMCV_ICAPMIRROR = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+52);
  DTWAIN_CFMCV_ICAPEASYSCANMODE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+53);
  DTWAIN_CFMCV_ICAPSOFTWAREINTERPOLATION = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+54);
  DTWAIN_CFMCV_ICAPIMAGESEPARATIONEX = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+55);
  DTWAIN_CFMCV_CAPDUPLEXPAGE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+56);
  DTWAIN_CFMCV_ICAPINVERTIMAGE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+57);
  DTWAIN_CFMCV_ICAPSPECKLEREMOVE = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+58);
  DTWAIN_CFMCV_ICAPUSMFILTER = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+59);
  DTWAIN_CFMCV_ICAPNOISEFILTERCFM = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+60);
  DTWAIN_CFMCV_ICAPDESCREENING = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+61);
  DTWAIN_CFMCV_ICAPQUALITYFILTER = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+62);
  DTWAIN_CFMCV_ICAPBINARYFILTER = (DTWAIN_CV_CAPCUSTOMBASE+DTWAIN_CFMCV_CAPCFMSTART+63);
  DTWAIN_OCRCV_IMAGEFILEFORMAT = $1000;
  DTWAIN_OCRCV_DESKEW = $1001;
  DTWAIN_OCRCV_DESHADE = $1002;
  DTWAIN_OCRCV_ORIENTATION = $1003;
  DTWAIN_OCRCV_NOISEREMOVE = $1004;
  DTWAIN_OCRCV_LINEREMOVE = $1005;
  DTWAIN_OCRCV_INVERTPAGE = $1006;
  DTWAIN_OCRCV_INVERTZONES = $1007;
  DTWAIN_OCRCV_LINEREJECT = $1008;
  DTWAIN_OCRCV_CHARACTERREJECT = $1009;
  DTWAIN_OCRCV_ERRORREPORTMODE = $1010;
  DTWAIN_OCRCV_ERRORREPORTFILE = $1011;
  DTWAIN_OCRCV_PIXELTYPE = $1012;
  DTWAIN_OCRCV_BITDEPTH = $1013;
  DTWAIN_OCRCV_RETURNCHARINFO = $1014;
  DTWAIN_OCRCV_NATIVEFILEFORMAT = $1015;
  DTWAIN_OCRCV_MPNATIVEFILEFORMAT = $1016;
  DTWAIN_OCRCV_SUPPORTEDCAPS = $1017;
  DTWAIN_OCRCV_DISABLECHARACTERS = $1018;
  DTWAIN_OCRCV_REMOVECONTROLCHARS = $1019;
  DTWAIN_OCRORIENT_OFF = 0;
  DTWAIN_OCRORIENT_AUTO = 1;
  DTWAIN_OCRORIENT_90 = 2;
  DTWAIN_OCRORIENT_180 = 3;
  DTWAIN_OCRORIENT_270 = 4;
  DTWAIN_OCRIMAGEFORMAT_AUTO = 10000;
  DTWAIN_OCRERROR_MODENONE = 0;
  DTWAIN_OCRERROR_SHOWMSGBOX = 1;
  DTWAIN_OCRERROR_WRITEFILE = 2;
  DTWAIN_PDFTEXT_ALLPAGES = $00000001;
  DTWAIN_PDFTEXT_EVENPAGES = $00000002;
  DTWAIN_PDFTEXT_ODDPAGES = $00000004;
  DTWAIN_PDFTEXT_FIRSTPAGE = $00000008;
  DTWAIN_PDFTEXT_LASTPAGE = $00000010;
  DTWAIN_PDFTEXT_CURRENTPAGE = $00000020;
  DTWAIN_PDFTEXT_DISABLED = $00000040;
  DTWAIN_PDFTEXT_TOPLEFT = $00000100;
  DTWAIN_PDFTEXT_TOPRIGHT = $00000200;
  DTWAIN_PDFTEXT_HORIZCENTER = $00000400;
  DTWAIN_PDFTEXT_VERTCENTER = $00000800;
  DTWAIN_PDFTEXT_BOTTOMLEFT = $00001000;
  DTWAIN_PDFTEXT_BOTTOMRIGHT = $00002000;
  DTWAIN_PDFTEXT_BOTTOMCENTER = $00004000;
  DTWAIN_PDFTEXT_TOPCENTER = $00008000;
  DTWAIN_PDFTEXT_XCENTER = $00010000;
  DTWAIN_PDFTEXT_YCENTER = $00020000;
  DTWAIN_PDFTEXT_NOSCALING = $00100000;
  DTWAIN_PDFTEXT_NOCHARSPACING = $00200000;
  DTWAIN_PDFTEXT_NOWORDSPACING = $00400000;
  DTWAIN_PDFTEXT_NOSTROKEWIDTH = $00800000;
  DTWAIN_PDFTEXT_NORENDERMODE = $01000000;
  DTWAIN_PDFTEXT_NORGBCOLOR = $02000000;
  DTWAIN_PDFTEXT_NOFONTSIZE = $04000000;
  DTWAIN_PDFTEXT_NOABSPOSITION = $08000000;
  DTWAIN_PDFTEXT_NOROTATION = $10000000;
  DTWAIN_PDFTEXT_NOSKEWING = $20000000;
  DTWAIN_PDFTEXT_NOSCALINGXY = $40000000;
  DTWAIN_PDFTEXT_IGNOREALL = $FFF00000;
  DTWAIN_FONT_COURIER = 0;
  DTWAIN_FONT_COURIERBOLD = 1;
  DTWAIN_FONT_COURIERBOLDOBLIQUE = 2;
  DTWAIN_FONT_COURIEROBLIQUE = 3;
  DTWAIN_FONT_HELVETICA = 4;
  DTWAIN_FONT_HELVETICABOLD = 5;
  DTWAIN_FONT_HELVETICABOLDOBLIQUE = 6;
  DTWAIN_FONT_HELVETICAOBLIQUE = 7;
  DTWAIN_FONT_TIMESBOLD = 8;
  DTWAIN_FONT_TIMESBOLDITALIC = 9;
  DTWAIN_FONT_TIMESROMAN = 10;
  DTWAIN_FONT_TIMESITALIC = 11;
  DTWAIN_FONT_SYMBOL = 12;
  DTWAIN_FONT_ZAPFDINGBATS = 13;
  DTWAIN_PDFRENDER_FILL = 0;
  DTWAIN_PDFRENDER_STROKE = 1;
  DTWAIN_PDFRENDER_FILLSTROKE = 2;
  DTWAIN_PDFRENDER_INVISIBLE = 3;
  DTWAIN_PDFTEXTELEMENT_SCALINGXY = 0;
  DTWAIN_PDFTEXTELEMENT_FONTHEIGHT = 1;
  DTWAIN_PDFTEXTELEMENT_WORDSPACING = 2;
  DTWAIN_PDFTEXTELEMENT_POSITION = 3;
  DTWAIN_PDFTEXTELEMENT_COLOR = 4;
  DTWAIN_PDFTEXTELEMENT_STROKEWIDTH = 5;
  DTWAIN_PDFTEXTELEMENT_DISPLAYFLAGS = 6;
  DTWAIN_PDFTEXTELEMENT_FONTNAME = 7;
  DTWAIN_PDFTEXTELEMENT_TEXT = 8;
  DTWAIN_PDFTEXTELEMENT_RENDERMODE = 9;
  DTWAIN_PDFTEXTELEMENT_CHARSPACING = 10;
  DTWAIN_PDFTEXTELEMENT_ROTATIONANGLE = 11;
  DTWAIN_PDFTEXTELEMENT_LEADING = 12;
  DTWAIN_PDFTEXTELEMENT_SCALING = 13;
  DTWAIN_PDFTEXTELEMENT_TEXTLENGTH = 14;
  DTWAIN_PDFTEXTELEMENT_SKEWANGLES = 15;
  DTWAIN_PDFTEXTELEMENT_TRANSFORMORDER = 16;
  DTWAIN_PDFTEXTTRANSFORM_SRK = 0;
  DTWAIN_PDFTEXTTRANSFORM_SKR = 1;
  DTWAIN_PDFTEXTTRANSFORM_KSR = 2;
  DTWAIN_PDFTEXTTRANSFORM_KRS = 3;
  DTWAIN_PDFTEXTTRANSFORM_RSK = 4;
  DTWAIN_PDFTEXTTRANSFORM_RKS = 5;
  DTWAIN_PDFTEXTTRANFORM_LAST = DTWAIN_PDFTEXTTRANSFORM_RKS;
  DTWAIN_TWDF_ULTRASONIC = 0;
  DTWAIN_TWDF_BYLENGTH = 1;
  DTWAIN_TWDF_INFRARED = 2;
  DTWAIN_TWAS_NONE = 0;
  DTWAIN_TWAS_AUTO = 1;
  DTWAIN_TWAS_CURRENT = 2;
  DTWAIN_TWFR_BOOK = 0;
  DTWAIN_TWFR_FANFOLD = 1;
  DTWAIN_CONSTANT_TWPT = 0;
  DTWAIN_CONSTANT_TWUN = 1;
  DTWAIN_CONSTANT_TWCY = 2;
  DTWAIN_CONSTANT_TWAL = 3;
  DTWAIN_CONSTANT_TWAS = 4;
  DTWAIN_CONSTANT_TWBCOR = 5;
  DTWAIN_CONSTANT_TWBD = 6;
  DTWAIN_CONSTANT_TWBO = 7;
  DTWAIN_CONSTANT_TWBP = 8;
  DTWAIN_CONSTANT_TWBR = 9;
  DTWAIN_CONSTANT_TWBT = 10;
  DTWAIN_CONSTANT_TWCP = 11;
  DTWAIN_CONSTANT_TWCS = 12;
  DTWAIN_CONSTANT_TWDE = 13;
  DTWAIN_CONSTANT_TWDR = 14;
  DTWAIN_CONSTANT_TWDSK = 15;
  DTWAIN_CONSTANT_TWDX = 16;
  DTWAIN_CONSTANT_TWFA = 17;
  DTWAIN_CONSTANT_TWFE = 18;
  DTWAIN_CONSTANT_TWFF = 19;
  DTWAIN_CONSTANT_TWFL = 20;
  DTWAIN_CONSTANT_TWFO = 21;
  DTWAIN_CONSTANT_TWFP = 22;
  DTWAIN_CONSTANT_TWFR = 23;
  DTWAIN_CONSTANT_TWFT = 24;
  DTWAIN_CONSTANT_TWFY = 25;
  DTWAIN_CONSTANT_TWIA = 26;
  DTWAIN_CONSTANT_TWIC = 27;
  DTWAIN_CONSTANT_TWIF = 28;
  DTWAIN_CONSTANT_TWIM = 29;
  DTWAIN_CONSTANT_TWJC = 30;
  DTWAIN_CONSTANT_TWJQ = 31;
  DTWAIN_CONSTANT_TWLP = 32;
  DTWAIN_CONSTANT_TWLS = 33;
  DTWAIN_CONSTANT_TWMD = 34;
  DTWAIN_CONSTANT_TWNF = 35;
  DTWAIN_CONSTANT_TWOR = 36;
  DTWAIN_CONSTANT_TWOV = 37;
  DTWAIN_CONSTANT_TWPA = 38;
  DTWAIN_CONSTANT_TWPC = 39;
  DTWAIN_CONSTANT_TWPCH = 40;
  DTWAIN_CONSTANT_TWPF = 41;
  DTWAIN_CONSTANT_TWPM = 42;
  DTWAIN_CONSTANT_TWPR = 43;
  DTWAIN_CONSTANT_TWPF2 = 44;
  DTWAIN_CONSTANT_TWCT = 45;
  DTWAIN_CONSTANT_TWPS = 46;
  DTWAIN_CONSTANT_TWSS = 47;
  DTWAIN_CONSTANT_TWPH = 48;
  DTWAIN_CONSTANT_TWCI = 49;
  DTWAIN_CONSTANT_FONTNAME = 50;
  DTWAIN_CONSTANT_TWEI = 51;
  DTWAIN_CONSTANT_TWEJ = 52;
  DTWAIN_CONSTANT_TWCC = 53;
  DTWAIN_CONSTANT_TWQC = 54;
  DTWAIN_CONSTANT_TWRC = 55;
  DTWAIN_CONSTANT_MSG = 56;
  DTWAIN_CONSTANT_TWLG = 57;
  DTWAIN_CONSTANT_DLLINFO = 58;
  DTWAIN_CONSTANT_DG = 59;
  DTWAIN_CONSTANT_DAT = 60;
  DTWAIN_CONSTANT_DF = 61;
  DTWAIN_CONSTANT_TWTY = 62;
  DTWAIN_CONSTANT_TWCB = 63;
  DTWAIN_CONSTANT_TWAF = 64;
  DTWAIN_CONSTANT_TWFS = 65;
  DTWAIN_CONSTANT_TWJS = 66;
  DTWAIN_CONSTANT_TWMR = 67;
  DTWAIN_CONSTANT_TWDP = 68;
  DTWAIN_CONSTANT_TWUS = 69;
  DTWAIN_CONSTANT_TWDF = 70;
  DTWAIN_CONSTANT_TWFM = 71;
  DTWAIN_CONSTANT_TWSG = 72;
  DTWAIN_CONSTANT_DTWAIN_TN = 73;
  DTWAIN_CONSTANT_TWON = 74;
  DTWAIN_CONSTANT_TWMF = 75;
  DTWAIN_CONSTANT_TWSX = 76;
  DTWAIN_CONSTANT_CAP = 77;
  DTWAIN_CONSTANT_ICAP = 78;
  DTWAIN_CONSTANT_DTWAIN_CONT = 79;
  DTWAIN_CONSTANT_CAPCODE_MAP = 80;
  DTWAIN_CONSTANT_ACAP = 81;
  DTWAIN_CONSTANT_CAPCODE_NOMNEMONIC = 82;
  DTWAIN_CONSTANT_DTWAINCONT_TWAINCONT = 83;
  DTWAIN_CONSTANT_ERROR_NAMES = 84;
  DTWAIN_USERRES_START = 20000;
  DTWAIN_USERRES_MAXSIZE = 8192;
  DTWAIN_APIHANDLEOK = 1;
  DTWAIN_TWAINSESSIONOK = 2;
  DTWAIN_PDF_AES128 = 1;
  DTWAIN_PDF_AES256 = 2;
  DTWAIN_FEEDER_TERMINATE = 1;
  DTWAIN_FEEDER_USEFLATBED = 2;

{ DTWAIN DLL functional interface }

function DTWAIN_AcquireAudioFile(Source:DTWAIN_SOURCE; lpszFile:LPCTSTR; lFileFlags:LONG; lMaxClips:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireAudioFile';
function DTWAIN_AcquireAudioFileA(Source:DTWAIN_SOURCE; lpszFile:LPCSTR; lFileFlags:LONG; lNumClips:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireAudioFileA';
function DTWAIN_AcquireAudioFileW(Source:DTWAIN_SOURCE; lpszFile:LPCWSTR; lFileFlags:LONG; lNumClips:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireAudioFileW';
function DTWAIN_AcquireAudioNative(Source:DTWAIN_SOURCE; nMaxAudioClips:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireAudioNative';
function DTWAIN_AcquireAudioNativeEx(Source:DTWAIN_SOURCE; nMaxAudioClips:LONG; bShowUI:BOOL; bCloseSource:BOOL; Acquisitions:DTWAIN_ARRAY; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireAudioNativeEx';
function DTWAIN_AcquireBuffered(Source:DTWAIN_SOURCE; PixelType:LONG; nMaxPages:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireBuffered';
function DTWAIN_AcquireBufferedEx(Source:DTWAIN_SOURCE; PixelType:LONG; nMaxPages:LONG; bShowUI:BOOL; bCloseSource:BOOL; Acquisitions:DTWAIN_ARRAY; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireBufferedEx';
function DTWAIN_AcquireFile(Source:DTWAIN_SOURCE; lpszFile:LPCTSTR; lFileType:LONG; lFileFlags:LONG; PixelType:LONG; lMaxPages:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireFile';
function DTWAIN_AcquireFileA(Source:DTWAIN_SOURCE; lpszFile:LPCSTR; lFileType:LONG; lFileFlags:LONG; PixelType:LONG; lMaxPages:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireFileA';
function DTWAIN_AcquireFileEx(Source:DTWAIN_SOURCE; aFileNames:DTWAIN_ARRAY; lFileType:LONG; lFileFlags:LONG; PixelType:LONG; lMaxPages:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireFileEx';
function DTWAIN_AcquireFileW(Source:DTWAIN_SOURCE; lpszFile:LPCWSTR; lFileType:LONG; lFileFlags:LONG; PixelType:LONG; lMaxPages:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireFileW';
function DTWAIN_AcquireNative(Source:DTWAIN_SOURCE; PixelType:LONG; nMaxPages:LONG; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireNative';
function DTWAIN_AcquireNativeEx(Source:DTWAIN_SOURCE; PixelType:LONG; nMaxPages:LONG; bShowUI:BOOL; bCloseSource:BOOL; Acquisitions:DTWAIN_ARRAY; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireNativeEx';
function DTWAIN_AcquireToClipboard(Source:DTWAIN_SOURCE; PixelType:LONG; nMaxPages:LONG; nTransferMode:LONG; bDiscardDibs:BOOL; bShowUI:BOOL; bCloseSource:BOOL; pStatus:LPLONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AcquireToClipboard';
function DTWAIN_AddExtImageInfoQuery(Source:DTWAIN_SOURCE; ExtImageInfo:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddExtImageInfoQuery';
function DTWAIN_AddFileToAppend(szFile:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddFileToAppend';
function DTWAIN_AddFileToAppendA(szFile:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddFileToAppendA';
function DTWAIN_AddFileToAppendW(szFile:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddFileToAppendW';
function DTWAIN_AddPDFText(Source:DTWAIN_SOURCE; szText:LPCTSTR; xPos:LONG; yPos:LONG; fontName:LPCTSTR; fontSize:DTWAIN_FLOAT; colorRGB:LONG; renderMode:LONG; scaling:DTWAIN_FLOAT; charSpacing:DTWAIN_FLOAT; wordSpacing:DTWAIN_FLOAT; strokeWidth:DTWAIN_FLOAT; Flags:DWORD) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFText';
function DTWAIN_AddPDFTextA(Source:DTWAIN_SOURCE; szText:LPCSTR; xPos:LONG; yPos:LONG; fontName:LPCSTR; fontSize:DTWAIN_FLOAT; colorRGB:LONG; renderMode:LONG; scaling:DTWAIN_FLOAT; charSpacing:DTWAIN_FLOAT; wordSpacing:DTWAIN_FLOAT; strokeWidth:DTWAIN_FLOAT; Flags:DWORD) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFTextA';
function DTWAIN_AddPDFTextElement(Source:DTWAIN_SOURCE; TextElement:DTWAIN_PDFTEXTELEMENT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFTextElement';
function DTWAIN_AddPDFTextEx(Source:DTWAIN_SOURCE; szText:LPCTSTR; xPos:LONG; yPos:LONG; fontName:LPCTSTR; fontSize:DTWAIN_FLOAT; colorRGB:LONG; renderMode:LONG; scaling:DTWAIN_FLOAT; charSpacing:DTWAIN_FLOAT; wordSpacing:DTWAIN_FLOAT; strokeWidth:DTWAIN_FLOAT; rotationAngle:DTWAIN_FLOAT; skewAngleX:DTWAIN_FLOAT; skewAngleY:DTWAIN_FLOAT; scalingX:DTWAIN_FLOAT; scalingY:DTWAIN_FLOAT; transformType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFTextEx';
function DTWAIN_AddPDFTextExA(Source:DTWAIN_SOURCE; szText:LPCSTR; xPos:LONG; yPos:LONG; fontName:LPCSTR; fontSize:DTWAIN_FLOAT; colorRGB:LONG; renderMode:LONG; scaling:DTWAIN_FLOAT; charSpacing:DTWAIN_FLOAT; wordSpacing:DTWAIN_FLOAT; strokeWidth:DTWAIN_FLOAT; rotationAngle:DTWAIN_FLOAT; skewAngleX:DTWAIN_FLOAT; skewAngleY:DTWAIN_FLOAT; scalingX:DTWAIN_FLOAT; scalingY:DTWAIN_FLOAT; transformType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFTextExA';
function DTWAIN_AddPDFTextExW(Source:DTWAIN_SOURCE; szText:LPCWSTR; xPos:LONG; yPos:LONG; fontName:LPCWSTR; fontSize:DTWAIN_FLOAT; colorRGB:LONG; renderMode:LONG; scaling:DTWAIN_FLOAT; charSpacing:DTWAIN_FLOAT; wordSpacing:DTWAIN_FLOAT; strokeWidth:DTWAIN_FLOAT; rotationAngle:DTWAIN_FLOAT; skewAngleX:DTWAIN_FLOAT; skewAngleY:DTWAIN_FLOAT; scalingX:DTWAIN_FLOAT; scalingY:DTWAIN_FLOAT; transformType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFTextExW';
function DTWAIN_AddPDFTextString(Source:DTWAIN_SOURCE; szText:LPCTSTR; xPos:LONG; yPos:LONG; fontName:LPCTSTR; fontSize:LPCTSTR; colorRGB:LONG; renderMode:LONG; scaling:LPCTSTR; charSpacing:LPCTSTR; wordSpacing:LPCTSTR; strokeWidth:LPCTSTR; Flags:DWORD) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFTextString';
function DTWAIN_AddPDFTextStringA(Source:DTWAIN_SOURCE; szText:LPCSTR; xPos:LONG; yPos:LONG; fontName:LPCSTR; fontSize:LPCSTR; colorRGB:LONG; renderMode:LONG; scaling:LPCSTR; charSpacing:LPCSTR; wordSpacing:LPCSTR; strokeWidth:LPCSTR; Flags:DWORD) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFTextStringA';
function DTWAIN_AddPDFTextStringW(Source:DTWAIN_SOURCE; szText:LPCWSTR; xPos:LONG; yPos:LONG; fontName:LPCWSTR; fontSize:LPCWSTR; colorRGB:LONG; renderMode:LONG; scaling:LPCWSTR; charSpacing:LPCWSTR; wordSpacing:LPCWSTR; strokeWidth:LPCWSTR; Flags:DWORD) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFTextStringW';
function DTWAIN_AddPDFTextW(Source:DTWAIN_SOURCE; szText:LPCWSTR; xPos:LONG; yPos:LONG; fontName:LPCWSTR; fontSize:DTWAIN_FLOAT; colorRGB:LONG; renderMode:LONG; scaling:DTWAIN_FLOAT; charSpacing:DTWAIN_FLOAT; wordSpacing:DTWAIN_FLOAT; strokeWidth:DTWAIN_FLOAT; Flags:DWORD) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AddPDFTextW';
function DTWAIN_AllocateMemory(memSize:DWORD) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AllocateMemory';
function DTWAIN_AllocateMemory64(memSize:UInt64) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AllocateMemory64';
function DTWAIN_AllocateMemoryEx(memSize:DWORD) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AllocateMemoryEx';
function DTWAIN_AppHandlesExceptions(bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_AppHandlesExceptions';
function DTWAIN_ArrayANSIStringToFloat(StringArray:DTWAIN_ARRAY) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayANSIStringToFloat';
function DTWAIN_ArrayAdd(pArray:DTWAIN_ARRAY; pVariant:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAdd';
function DTWAIN_ArrayAddANSIString(pArray:DTWAIN_ARRAY; Val:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddANSIString';
function DTWAIN_ArrayAddANSIStringN(pArray:DTWAIN_ARRAY; Val:LPCSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddANSIStringN';
function DTWAIN_ArrayAddFloat(pArray:DTWAIN_ARRAY; Val:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFloat';
function DTWAIN_ArrayAddFloatN(pArray:DTWAIN_ARRAY; Val:DTWAIN_FLOAT; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFloatN';
function DTWAIN_ArrayAddFloatString(pArray:DTWAIN_ARRAY; Val:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFloatString';
function DTWAIN_ArrayAddFloatStringA(pArray:DTWAIN_ARRAY; Val:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFloatStringA';
function DTWAIN_ArrayAddFloatStringN(pArray:DTWAIN_ARRAY; Val:LPCTSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFloatStringN';
function DTWAIN_ArrayAddFloatStringNA(pArray:DTWAIN_ARRAY; Val:LPCSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFloatStringNA';
function DTWAIN_ArrayAddFloatStringNW(pArray:DTWAIN_ARRAY; Val:LPCWSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFloatStringNW';
function DTWAIN_ArrayAddFloatStringW(pArray:DTWAIN_ARRAY; Val:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFloatStringW';
function DTWAIN_ArrayAddFrame(pArray:DTWAIN_ARRAY; frame:DTWAIN_FRAME) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFrame';
function DTWAIN_ArrayAddFrameN(pArray:DTWAIN_ARRAY; frame:DTWAIN_FRAME; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddFrameN';
function DTWAIN_ArrayAddLong(pArray:DTWAIN_ARRAY; Val:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddLong';
function DTWAIN_ArrayAddLong64(pArray:DTWAIN_ARRAY; Val:Int64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddLong64';
function DTWAIN_ArrayAddLong64N(pArray:DTWAIN_ARRAY; Val:Int64; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddLong64N';
function DTWAIN_ArrayAddLongN(pArray:DTWAIN_ARRAY; Val:LONG; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddLongN';
function DTWAIN_ArrayAddN(pArray:DTWAIN_ARRAY; pVariant:LPVOID; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddN';
function DTWAIN_ArrayAddString(pArray:DTWAIN_ARRAY; Val:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddString';
function DTWAIN_ArrayAddStringA(pArray:DTWAIN_ARRAY; Val:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddStringA';
function DTWAIN_ArrayAddStringN(pArray:DTWAIN_ARRAY; Val:LPCTSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddStringN';
function DTWAIN_ArrayAddStringNA(pArray:DTWAIN_ARRAY; Val:LPCSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddStringNA';
function DTWAIN_ArrayAddStringNW(pArray:DTWAIN_ARRAY; Val:LPCWSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddStringNW';
function DTWAIN_ArrayAddStringW(pArray:DTWAIN_ARRAY; Val:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddStringW';
function DTWAIN_ArrayAddWideString(pArray:DTWAIN_ARRAY; Val:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddWideString';
function DTWAIN_ArrayAddWideStringN(pArray:DTWAIN_ARRAY; Val:LPCWSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayAddWideStringN';
function DTWAIN_ArrayConvertFix32ToFloat(Fix32Array:DTWAIN_ARRAY) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayConvertFix32ToFloat';
function DTWAIN_ArrayConvertFloatToFix32(FloatArray:DTWAIN_ARRAY) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayConvertFloatToFix32';
function DTWAIN_ArrayCopy(Source:DTWAIN_ARRAY; Dest:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCopy';
function DTWAIN_ArrayCreate(nEnumType:LONG; nInitialSize:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCreate';
function DTWAIN_ArrayCreateCopy(Source:DTWAIN_ARRAY) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCreateCopy';
function DTWAIN_ArrayCreateFromCap(Source:DTWAIN_SOURCE; lCapType:LONG; lSize:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCreateFromCap';
function DTWAIN_ArrayCreateFromLong64s(pCArray:LPLONG64; nSize:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCreateFromLong64s';
function DTWAIN_ArrayCreateFromLongs(pCArray:LPLONG; nSize:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCreateFromLongs';
function DTWAIN_ArrayCreateFromReals(nSize:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCreateFromReals';
function DTWAIN_ArrayCreateFromStrings(nSize:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCreateFromStrings';
function DTWAIN_ArrayCreateFromStringsA(nSize:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCreateFromStringsA';
function DTWAIN_ArrayCreateFromStringsW(nSize:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayCreateFromStringsW';
function DTWAIN_ArrayDestroy(pArray:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayDestroy';
function DTWAIN_ArrayDestroyFrames(FrameArray:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayDestroyFrames';
function DTWAIN_ArrayDumpToLog(pArray:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayDumpToLog';
function DTWAIN_ArrayFind(pArray:DTWAIN_ARRAY; pVariant:LPVOID) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFind';
function DTWAIN_ArrayFindANSIString(pArray:DTWAIN_ARRAY; pString:LPCSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindANSIString';
function DTWAIN_ArrayFindFloat(pArray:DTWAIN_ARRAY; Val:DTWAIN_FLOAT; Tolerance:DTWAIN_FLOAT) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindFloat';
function DTWAIN_ArrayFindFloatString(pArray:DTWAIN_ARRAY; Val:LPCTSTR; Tolerance:LPCTSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindFloatString';
function DTWAIN_ArrayFindFloatStringA(pArray:DTWAIN_ARRAY; Val:LPCSTR; Tolerance:LPCSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindFloatStringA';
function DTWAIN_ArrayFindFloatStringW(pArray:DTWAIN_ARRAY; Val:LPCWSTR; Tolerance:LPCWSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindFloatStringW';
function DTWAIN_ArrayFindLong(pArray:DTWAIN_ARRAY; Val:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindLong';
function DTWAIN_ArrayFindLong64(pArray:DTWAIN_ARRAY; Val:Int64) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindLong64';
function DTWAIN_ArrayFindString(pArray:DTWAIN_ARRAY; pString:LPCTSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindString';
function DTWAIN_ArrayFindStringA(pArray:DTWAIN_ARRAY; pString:LPCSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindStringA';
function DTWAIN_ArrayFindStringW(pArray:DTWAIN_ARRAY; pString:LPCWSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindStringW';
function DTWAIN_ArrayFindWideString(pArray:DTWAIN_ARRAY; pString:LPCWSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFindWideString';
function DTWAIN_ArrayFix32GetAt(aFix32:DTWAIN_ARRAY; lPos:LONG; Whole:LPLONG; Frac:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFix32GetAt';
function DTWAIN_ArrayFix32SetAt(aFix32:DTWAIN_ARRAY; lPos:LONG; Whole:LONG; Frac:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFix32SetAt';
function DTWAIN_ArrayFloatToANSIString(FloatArray:DTWAIN_ARRAY) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFloatToANSIString';
function DTWAIN_ArrayFloatToString(FloatArray:DTWAIN_ARRAY) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFloatToString';
function DTWAIN_ArrayFloatToWideString(FloatArray:DTWAIN_ARRAY) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayFloatToWideString';
function DTWAIN_ArrayGetAt(pArray:DTWAIN_ARRAY; nWhere:LONG; pVariant:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAt';
function DTWAIN_ArrayGetAtANSIString(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtANSIString';
function DTWAIN_ArrayGetAtANSIStringPtr(pArray:DTWAIN_ARRAY; nWhere:LONG) : LPCSTR; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtANSIStringPtr';
function DTWAIN_ArrayGetAtFloat(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFloat';
function DTWAIN_ArrayGetAtFloatEx(pArray:DTWAIN_ARRAY; nWhere:LONG) : DTWAIN_FLOAT; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFloatEx';
function DTWAIN_ArrayGetAtFloatString(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFloatString';
function DTWAIN_ArrayGetAtFloatStringA(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFloatStringA';
function DTWAIN_ArrayGetAtFloatStringW(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFloatStringW';
function DTWAIN_ArrayGetAtFrame(FrameArray:DTWAIN_ARRAY; nWhere:LONG; pleft:LPDTWAIN_FLOAT; ptop:LPDTWAIN_FLOAT; pright:LPDTWAIN_FLOAT; pbottom:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFrame';
function DTWAIN_ArrayGetAtFrameEx(FrameArray:DTWAIN_ARRAY; nWhere:LONG; Frame:DTWAIN_FRAME) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFrameEx';
function DTWAIN_ArrayGetAtFrameString(FrameArray:DTWAIN_ARRAY; nWhere:LONG; left:LPTSTR; top:LPTSTR; right:LPTSTR; bottom:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFrameString';
function DTWAIN_ArrayGetAtFrameStringA(FrameArray:DTWAIN_ARRAY; nWhere:LONG; left:LPSTR; top:LPSTR; right:LPSTR; bottom:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFrameStringA';
function DTWAIN_ArrayGetAtFrameStringW(FrameArray:DTWAIN_ARRAY; nWhere:LONG; left:LPWSTR; top:LPWSTR; right:LPWSTR; bottom:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtFrameStringW';
function DTWAIN_ArrayGetAtLong(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtLong';
function DTWAIN_ArrayGetAtLong64(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LPLONG64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtLong64';
function DTWAIN_ArrayGetAtLong64Ex(pArray:DTWAIN_ARRAY; nWhere:LONG) : Int64; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtLong64Ex';
function DTWAIN_ArrayGetAtLongEx(pArray:DTWAIN_ARRAY; nWhere:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtLongEx';
function DTWAIN_ArrayGetAtSource(pArray:DTWAIN_ARRAY; nWhere:LONG; ppSource:LPDTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtSource';
function DTWAIN_ArrayGetAtSourceEx(pArray:DTWAIN_ARRAY; nWhere:LONG) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtSourceEx';
function DTWAIN_ArrayGetAtString(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtString';
function DTWAIN_ArrayGetAtStringA(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtStringA';
function DTWAIN_ArrayGetAtStringPtr(pArray:DTWAIN_ARRAY; nWhere:LONG) : LPCTSTR; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtStringPtr';
function DTWAIN_ArrayGetAtStringW(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtStringW';
function DTWAIN_ArrayGetAtWideString(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtWideString';
function DTWAIN_ArrayGetAtWideStringPtr(pArray:DTWAIN_ARRAY; nWhere:LONG) : LPCWSTR; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetAtWideStringPtr';
function DTWAIN_ArrayGetBuffer(pArray:DTWAIN_ARRAY; nPos:LONG) : LPVOID; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetBuffer';
function DTWAIN_ArrayGetCapValues(Source:DTWAIN_SOURCE; lCap:LONG; lGetType:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetCapValues';
function DTWAIN_ArrayGetCapValuesEx(Source:DTWAIN_SOURCE; lCap:LONG; lGetType:LONG; lContainerType:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetCapValuesEx';
function DTWAIN_ArrayGetCapValuesEx2(Source:DTWAIN_SOURCE; lCap:LONG; lGetType:LONG; lContainerType:LONG; nDataType:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetCapValuesEx2';
function DTWAIN_ArrayGetCount(pArray:DTWAIN_ARRAY) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetCount';
function DTWAIN_ArrayGetMaxStringLength(a:DTWAIN_ARRAY) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetMaxStringLength';
function DTWAIN_ArrayGetSourceAt(pArray:DTWAIN_ARRAY; nWhere:LONG; ppSource:LPDTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetSourceAt';
function DTWAIN_ArrayGetStringLength(a:DTWAIN_ARRAY; nWhichString:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetStringLength';
function DTWAIN_ArrayGetType(pArray:DTWAIN_ARRAY) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayGetType';
function DTWAIN_ArrayInit : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInit';
function DTWAIN_ArrayInsertAt(pArray:DTWAIN_ARRAY; nWhere:LONG; pVariant:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAt';
function DTWAIN_ArrayInsertAtANSIString(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtANSIString';
function DTWAIN_ArrayInsertAtANSIStringN(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtANSIStringN';
function DTWAIN_ArrayInsertAtFloat(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFloat';
function DTWAIN_ArrayInsertAtFloatN(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:DTWAIN_FLOAT; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFloatN';
function DTWAIN_ArrayInsertAtFloatString(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFloatString';
function DTWAIN_ArrayInsertAtFloatStringA(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFloatStringA';
function DTWAIN_ArrayInsertAtFloatStringN(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCTSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFloatStringN';
function DTWAIN_ArrayInsertAtFloatStringNA(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFloatStringNA';
function DTWAIN_ArrayInsertAtFloatStringNW(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCWSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFloatStringNW';
function DTWAIN_ArrayInsertAtFloatStringW(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFloatStringW';
function DTWAIN_ArrayInsertAtFrame(pArray:DTWAIN_ARRAY; nWhere:LONG; frame:DTWAIN_FRAME) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFrame';
function DTWAIN_ArrayInsertAtFrameN(pArray:DTWAIN_ARRAY; nWhere:LONG; frame:DTWAIN_FRAME; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtFrameN';
function DTWAIN_ArrayInsertAtLong(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtLong';
function DTWAIN_ArrayInsertAtLong64(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:Int64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtLong64';
function DTWAIN_ArrayInsertAtLong64N(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:Int64; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtLong64N';
function DTWAIN_ArrayInsertAtLongN(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LONG; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtLongN';
function DTWAIN_ArrayInsertAtN(pArray:DTWAIN_ARRAY; nWhere:LONG; pVariant:LPVOID; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtN';
function DTWAIN_ArrayInsertAtString(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtString';
function DTWAIN_ArrayInsertAtStringA(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtStringA';
function DTWAIN_ArrayInsertAtStringN(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCTSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtStringN';
function DTWAIN_ArrayInsertAtStringNA(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtStringNA';
function DTWAIN_ArrayInsertAtStringNW(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCWSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtStringNW';
function DTWAIN_ArrayInsertAtStringW(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtStringW';
function DTWAIN_ArrayInsertAtWideString(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtWideString';
function DTWAIN_ArrayInsertAtWideStringN(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCWSTR; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayInsertAtWideStringN';
function DTWAIN_ArrayRemoveAll(pArray:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayRemoveAll';
function DTWAIN_ArrayRemoveAt(pArray:DTWAIN_ARRAY; nWhere:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayRemoveAt';
function DTWAIN_ArrayRemoveAtN(pArray:DTWAIN_ARRAY; nWhere:LONG; num:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayRemoveAtN';
function DTWAIN_ArrayResize(pArray:DTWAIN_ARRAY; NewSize:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayResize';
function DTWAIN_ArraySetAt(pArray:DTWAIN_ARRAY; lPos:LONG; pVariant:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAt';
function DTWAIN_ArraySetAtANSIString(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtANSIString';
function DTWAIN_ArraySetAtFloat(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtFloat';
function DTWAIN_ArraySetAtFloatString(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtFloatString';
function DTWAIN_ArraySetAtFloatStringA(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtFloatStringA';
function DTWAIN_ArraySetAtFloatStringW(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtFloatStringW';
function DTWAIN_ArraySetAtFrame(FrameArray:DTWAIN_ARRAY; nWhere:LONG; left:DTWAIN_FLOAT; top:DTWAIN_FLOAT; right:DTWAIN_FLOAT; bottom:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtFrame';
function DTWAIN_ArraySetAtFrameEx(FrameArray:DTWAIN_ARRAY; nWhere:LONG; Frame:DTWAIN_FRAME) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtFrameEx';
function DTWAIN_ArraySetAtFrameString(FrameArray:DTWAIN_ARRAY; nWhere:LONG; left:LPCTSTR; top:LPCTSTR; right:LPCTSTR; bottom:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtFrameString';
function DTWAIN_ArraySetAtFrameStringA(FrameArray:DTWAIN_ARRAY; nWhere:LONG; left:LPCSTR; top:LPCSTR; right:LPCSTR; bottom:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtFrameStringA';
function DTWAIN_ArraySetAtFrameStringW(FrameArray:DTWAIN_ARRAY; nWhere:LONG; left:LPCWSTR; top:LPCWSTR; right:LPCWSTR; bottom:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtFrameStringW';
function DTWAIN_ArraySetAtLong(pArray:DTWAIN_ARRAY; nWhere:LONG; pVal:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtLong';
function DTWAIN_ArraySetAtLong64(pArray:DTWAIN_ARRAY; nWhere:LONG; Val:Int64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtLong64';
function DTWAIN_ArraySetAtString(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtString';
function DTWAIN_ArraySetAtStringA(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtStringA';
function DTWAIN_ArraySetAtStringW(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtStringW';
function DTWAIN_ArraySetAtWideString(pArray:DTWAIN_ARRAY; nWhere:LONG; pStr:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArraySetAtWideString';
function DTWAIN_ArrayStringToFloat(StringArray:DTWAIN_ARRAY) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayStringToFloat';
function DTWAIN_ArrayWideStringToFloat(StringArray:DTWAIN_ARRAY) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ArrayWideStringToFloat';
function DTWAIN_CallCallback(wParam:WPARAM; lParam:LPARAM; UserData:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_CallCallback';
function DTWAIN_CallCallback64(wParam:WPARAM; lParam:LPARAM; UserData:Int64) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_CallCallback64';
function DTWAIN_CallDSMProc(AppID:DTWAIN_IDENTITY; SourceId:DTWAIN_IDENTITY; lDG:LONG; lDAT:LONG; lMSG:LONG; pData:LPVOID) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_CallDSMProc';
function DTWAIN_CheckHandles(bCheck:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_CheckHandles';
function DTWAIN_ClearBuffers(Source:DTWAIN_SOURCE; ClearBuffer:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ClearBuffers';
function DTWAIN_ClearErrorBuffer : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ClearErrorBuffer';
function DTWAIN_ClearPDFTextElements(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ClearPDFTextElements';
function DTWAIN_ClearPage(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ClearPage';
function DTWAIN_CloseSource(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_CloseSource';
function DTWAIN_CloseSourceUI(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_CloseSourceUI';
function DTWAIN_ConvertDIBToBitmap(hDib:NativeInt; hPalette:NativeInt) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ConvertDIBToBitmap';
function DTWAIN_ConvertDIBToFullBitmap(hDib:NativeInt; isBMP:BOOL) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ConvertDIBToFullBitmap';
function DTWAIN_ConvertToAPIString(lpOrigString:LPCTSTR) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ConvertToAPIString';
function DTWAIN_ConvertToAPIStringA(lpOrigString:LPCSTR) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ConvertToAPIStringA';
function DTWAIN_ConvertToAPIStringEx(lpOrigString:LPCTSTR; lpOutString:LPTSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ConvertToAPIStringEx';
function DTWAIN_ConvertToAPIStringExA(lpOrigString:LPCSTR; lpOutString:LPSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ConvertToAPIStringExA';
function DTWAIN_ConvertToAPIStringExW(lpOrigString:LPCWSTR; lpOutString:LPWSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ConvertToAPIStringExW';
function DTWAIN_ConvertToAPIStringW(lpOrigString:LPCWSTR) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ConvertToAPIStringW';
function DTWAIN_CreateAcquisitionArray : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_CreateAcquisitionArray';
function DTWAIN_CreatePDFTextElement : DTWAIN_PDFTEXTELEMENT; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_CreatePDFTextElement';
function DTWAIN_CreatePDFTextElementCopy(TextElement:DTWAIN_PDFTEXTELEMENT) : DTWAIN_PDFTEXTELEMENT; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_CreatePDFTextElementCopy';
function DTWAIN_DeleteDIB(hDib:NativeInt) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_DeleteDIB';
function DTWAIN_DestroyAcquisitionArray(aAcq:DTWAIN_ARRAY; bDestroyData:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_DestroyAcquisitionArray';
function DTWAIN_DestroyPDFTextElement(TextElement:DTWAIN_PDFTEXTELEMENT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_DestroyPDFTextElement';
function DTWAIN_DisableAppWindow(hWnd:NativeInt; bDisable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_DisableAppWindow';
function DTWAIN_EnableAutoBorderDetect(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableAutoBorderDetect';
function DTWAIN_EnableAutoBright(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableAutoBright';
function DTWAIN_EnableAutoDeskew(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableAutoDeskew';
function DTWAIN_EnableAutoFeed(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableAutoFeed';
function DTWAIN_EnableAutoRotate(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableAutoRotate';
function DTWAIN_EnableAutoScan(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableAutoScan';
function DTWAIN_EnableAutomaticSenseMedium(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableAutomaticSenseMedium';
function DTWAIN_EnableBarcodeDetection(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableBarcodeDetection';
function DTWAIN_EnableDuplex(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableDuplex';
function DTWAIN_EnableFeeder(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableFeeder';
function DTWAIN_EnableGetMessageLoop(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableGetMessageLoop';
function DTWAIN_EnableGetMessageLoopDetection(bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableGetMessageLoopDetection';
function DTWAIN_EnableIndicator(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableIndicator';
function DTWAIN_EnableJobFileHandling(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableJobFileHandling';
function DTWAIN_EnableLamp(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableLamp';
function DTWAIN_EnableMsgNotify(bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableMsgNotify';
function DTWAIN_EnablePatchcodeDetection(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnablePatchcodeDetection';
function DTWAIN_EnablePeekMessageLoop(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnablePeekMessageLoop';
function DTWAIN_EnablePrinter(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnablePrinter';
function DTWAIN_EnableThumbnail(Source:DTWAIN_SOURCE; bEnable:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableThumbnail';
function DTWAIN_EnableTripletsNotify(bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnableTripletsNotify';
function DTWAIN_EndThread(DLLHandle:DTWAIN_HANDLE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EndThread';
function DTWAIN_EndTwainSession : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EndTwainSession';
function DTWAIN_EnumAlarmVolumes(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; expandIfRange:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAlarmVolumes';
function DTWAIN_EnumAlarmVolumesEx(Source:DTWAIN_SOURCE; expandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAlarmVolumesEx';
function DTWAIN_EnumAlarms(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAlarms';
function DTWAIN_EnumAlarmsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAlarmsEx';
function DTWAIN_EnumAudioXferMechs(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAudioXferMechs';
function DTWAIN_EnumAudioXferMechsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAudioXferMechsEx';
function DTWAIN_EnumAutoFeedValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAutoFeedValues';
function DTWAIN_EnumAutoFeedValuesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAutoFeedValuesEx';
function DTWAIN_EnumAutomaticCaptures(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAutomaticCaptures';
function DTWAIN_EnumAutomaticCapturesEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAutomaticCapturesEx';
function DTWAIN_EnumAutomaticSenseMedium(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAutomaticSenseMedium';
function DTWAIN_EnumAutomaticSenseMediumEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumAutomaticSenseMediumEx';
function DTWAIN_EnumBarcodeCodes(Source:DTWAIN_SOURCE; PCodes:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeCodes';
function DTWAIN_EnumBarcodeCodesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeCodesEx';
function DTWAIN_EnumBarcodeMaxPriorities(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeMaxPriorities';
function DTWAIN_EnumBarcodeMaxPrioritiesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeMaxPrioritiesEx';
function DTWAIN_EnumBarcodeMaxRetries(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeMaxRetries';
function DTWAIN_EnumBarcodeMaxRetriesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeMaxRetriesEx';
function DTWAIN_EnumBarcodePriorities(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodePriorities';
function DTWAIN_EnumBarcodePrioritiesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodePrioritiesEx';
function DTWAIN_EnumBarcodeSearchModes(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeSearchModes';
function DTWAIN_EnumBarcodeSearchModesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeSearchModesEx';
function DTWAIN_EnumBarcodeTimeOutValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeTimeOutValues';
function DTWAIN_EnumBarcodeTimeOutValuesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBarcodeTimeOutValuesEx';
function DTWAIN_EnumBitDepths(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBitDepths';
function DTWAIN_EnumBitDepthsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBitDepthsEx';
function DTWAIN_EnumBitDepthsEx2(Source:DTWAIN_SOURCE; PixelType:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBitDepthsEx2';
function DTWAIN_EnumBottomCameras(Source:DTWAIN_SOURCE; Cameras:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBottomCameras';
function DTWAIN_EnumBottomCamerasEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBottomCamerasEx';
function DTWAIN_EnumBrightnessValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBrightnessValues';
function DTWAIN_EnumBrightnessValuesEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumBrightnessValuesEx';
function DTWAIN_EnumCameras(Source:DTWAIN_SOURCE; Cameras:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumCameras';
function DTWAIN_EnumCamerasEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumCamerasEx';
function DTWAIN_EnumCamerasEx2(Source:DTWAIN_SOURCE; nWhichCamera:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumCamerasEx2';
function DTWAIN_EnumCapLabels(lCapability:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumCapLabels';
function DTWAIN_EnumCompressionTypes(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumCompressionTypes';
function DTWAIN_EnumCompressionTypesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumCompressionTypesEx';
function DTWAIN_EnumCompressionTypesEx2(Source:DTWAIN_SOURCE; lFileType:LONG; bUseBufferedMode:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumCompressionTypesEx2';
function DTWAIN_EnumContrastValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumContrastValues';
function DTWAIN_EnumContrastValuesEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumContrastValuesEx';
function DTWAIN_EnumCustomCaps(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumCustomCaps';
function DTWAIN_EnumCustomCapsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumCustomCapsEx';
function DTWAIN_EnumDoubleFeedDetectLengths(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumDoubleFeedDetectLengths';
function DTWAIN_EnumDoubleFeedDetectLengthsEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumDoubleFeedDetectLengthsEx';
function DTWAIN_EnumDoubleFeedDetectValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumDoubleFeedDetectValues';
function DTWAIN_EnumDoubleFeedDetectValuesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumDoubleFeedDetectValuesEx';
function DTWAIN_EnumExtImageInfoTypes(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumExtImageInfoTypes';
function DTWAIN_EnumExtImageInfoTypesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumExtImageInfoTypesEx';
function DTWAIN_EnumExtendedCaps(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumExtendedCaps';
function DTWAIN_EnumExtendedCapsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumExtendedCapsEx';
function DTWAIN_EnumExtendedCapsEx2(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumExtendedCapsEx2';
function DTWAIN_EnumFileTypeBitsPerPixel(FileType:LONG; Array_:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumFileTypeBitsPerPixel';
function DTWAIN_EnumFileXferFormats(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumFileXferFormats';
function DTWAIN_EnumFileXferFormatsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumFileXferFormatsEx';
function DTWAIN_EnumHalftones(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumHalftones';
function DTWAIN_EnumHalftonesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumHalftonesEx';
function DTWAIN_EnumHighlightValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumHighlightValues';
function DTWAIN_EnumHighlightValuesEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumHighlightValuesEx';
function DTWAIN_EnumJobControls(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumJobControls';
function DTWAIN_EnumJobControlsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumJobControlsEx';
function DTWAIN_EnumLightPaths(Source:DTWAIN_SOURCE; LightPath:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumLightPaths';
function DTWAIN_EnumLightPathsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumLightPathsEx';
function DTWAIN_EnumLightSources(Source:DTWAIN_SOURCE; LightSources:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumLightSources';
function DTWAIN_EnumLightSourcesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumLightSourcesEx';
function DTWAIN_EnumMaxBuffers(Source:DTWAIN_SOURCE; pMaxBufs:LPDTWAIN_ARRAY; bExpandRange:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumMaxBuffers';
function DTWAIN_EnumMaxBuffersEx(Source:DTWAIN_SOURCE; bExpandRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumMaxBuffersEx';
function DTWAIN_EnumNoiseFilters(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumNoiseFilters';
function DTWAIN_EnumNoiseFiltersEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumNoiseFiltersEx';
function DTWAIN_EnumOCRInterfaces(OCRInterfaces:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumOCRInterfaces';
function DTWAIN_EnumOCRInterfacesEx : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumOCRInterfacesEx';
function DTWAIN_EnumOCRSupportedCaps(Engine:DTWAIN_OCRENGINE; SupportedCaps:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumOCRSupportedCaps';
function DTWAIN_EnumOrientations(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumOrientations';
function DTWAIN_EnumOrientationsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumOrientationsEx';
function DTWAIN_EnumOverscanValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumOverscanValues';
function DTWAIN_EnumOverscanValuesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumOverscanValuesEx';
function DTWAIN_EnumPaperSizes(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPaperSizes';
function DTWAIN_EnumPaperSizesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPaperSizesEx';
function DTWAIN_EnumPatchcodeCodes(Source:DTWAIN_SOURCE; PCodes:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeCodes';
function DTWAIN_EnumPatchcodeCodesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeCodesEx';
function DTWAIN_EnumPatchcodeMaxPriorities(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeMaxPriorities';
function DTWAIN_EnumPatchcodeMaxPrioritiesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeMaxPrioritiesEx';
function DTWAIN_EnumPatchcodeMaxRetries(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeMaxRetries';
function DTWAIN_EnumPatchcodeMaxRetriesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeMaxRetriesEx';
function DTWAIN_EnumPatchcodePriorities(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodePriorities';
function DTWAIN_EnumPatchcodePrioritiesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodePrioritiesEx';
function DTWAIN_EnumPatchcodeSearchModes(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeSearchModes';
function DTWAIN_EnumPatchcodeSearchModesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeSearchModesEx';
function DTWAIN_EnumPatchcodeTimeOutValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeTimeOutValues';
function DTWAIN_EnumPatchcodeTimeOutValuesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPatchcodeTimeOutValuesEx';
function DTWAIN_EnumPixelTypes(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPixelTypes';
function DTWAIN_EnumPixelTypesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPixelTypesEx';
function DTWAIN_EnumPrinterStringModes(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPrinterStringModes';
function DTWAIN_EnumPrinterStringModesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumPrinterStringModesEx';
function DTWAIN_EnumResolutionValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumResolutionValues';
function DTWAIN_EnumResolutionValuesEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumResolutionValuesEx';
function DTWAIN_EnumShadowValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumShadowValues';
function DTWAIN_EnumShadowValuesEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumShadowValuesEx';
function DTWAIN_EnumSourceUnits(Source:DTWAIN_SOURCE; lpArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSourceUnits';
function DTWAIN_EnumSourceUnitsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSourceUnitsEx';
function DTWAIN_EnumSourceValues(Source:DTWAIN_SOURCE; capName:LPCTSTR; values:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSourceValues';
function DTWAIN_EnumSourceValuesA(Source:DTWAIN_SOURCE; capName:LPCSTR; values:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSourceValuesA';
function DTWAIN_EnumSourceValuesW(Source:DTWAIN_SOURCE; capName:LPCWSTR; values:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSourceValuesW';
function DTWAIN_EnumSources(lpArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSources';
function DTWAIN_EnumSourcesEx : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSourcesEx';
function DTWAIN_EnumSupportedCaps(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSupportedCaps';
function DTWAIN_EnumSupportedCapsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSupportedCapsEx';
function DTWAIN_EnumSupportedCapsEx2(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSupportedCapsEx2';
function DTWAIN_EnumSupportedExtImageInfo(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSupportedExtImageInfo';
function DTWAIN_EnumSupportedExtImageInfoEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSupportedExtImageInfoEx';
function DTWAIN_EnumSupportedFileTypes : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSupportedFileTypes';
function DTWAIN_EnumSupportedMultiPageFileTypes : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSupportedMultiPageFileTypes';
function DTWAIN_EnumSupportedSinglePageFileTypes : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumSupportedSinglePageFileTypes';
function DTWAIN_EnumThresholdValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumThresholdValues';
function DTWAIN_EnumThresholdValuesEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumThresholdValuesEx';
function DTWAIN_EnumTopCameras(Source:DTWAIN_SOURCE; Cameras:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumTopCameras';
function DTWAIN_EnumTopCamerasEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumTopCamerasEx';
function DTWAIN_EnumTwainPrinters(Source:DTWAIN_SOURCE; lpAvailPrinters:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumTwainPrinters';
function DTWAIN_EnumTwainPrintersEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumTwainPrintersEx';
function DTWAIN_EnumXResolutionValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumXResolutionValues';
function DTWAIN_EnumXResolutionValuesEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumXResolutionValuesEx';
function DTWAIN_EnumYResolutionValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY; bExpandIfRange:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumYResolutionValues';
function DTWAIN_EnumYResolutionValuesEx(Source:DTWAIN_SOURCE; bExpandIfRange:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_EnumYResolutionValuesEx';
function DTWAIN_ExecuteOCR(Engine:DTWAIN_OCRENGINE; szFileName:LPCTSTR; nStartPage:LONG; nEndPage:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ExecuteOCR';
function DTWAIN_ExecuteOCRA(Engine:DTWAIN_OCRENGINE; szFileName:LPCSTR; nStartPage:LONG; nEndPage:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ExecuteOCRA';
function DTWAIN_ExecuteOCRW(Engine:DTWAIN_OCRENGINE; szFileName:LPCWSTR; nStartPage:LONG; nEndPage:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ExecuteOCRW';
function DTWAIN_FeedPage(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FeedPage';
function DTWAIN_FlipBitmap(hDib:NativeInt) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FlipBitmap';
function DTWAIN_FlushAcquiredPages(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FlushAcquiredPages';
function DTWAIN_FrameCreate(Left:DTWAIN_FLOAT; Top:DTWAIN_FLOAT; Right:DTWAIN_FLOAT; Bottom:DTWAIN_FLOAT) : DTWAIN_FRAME; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameCreate';
function DTWAIN_FrameCreateString(Left:LPCTSTR; Top:LPCTSTR; Right:LPCTSTR; Bottom:LPCTSTR) : DTWAIN_FRAME; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameCreateString';
function DTWAIN_FrameCreateStringA(Left:LPCSTR; Top:LPCSTR; Right:LPCSTR; Bottom:LPCSTR) : DTWAIN_FRAME; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameCreateStringA';
function DTWAIN_FrameCreateStringW(Left:LPCWSTR; Top:LPCWSTR; Right:LPCWSTR; Bottom:LPCWSTR) : DTWAIN_FRAME; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameCreateStringW';
function DTWAIN_FrameDestroy(Frame:DTWAIN_FRAME) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameDestroy';
function DTWAIN_FrameGetAll(Frame:DTWAIN_FRAME; Left:LPDTWAIN_FLOAT; Top:LPDTWAIN_FLOAT; Right:LPDTWAIN_FLOAT; Bottom:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameGetAll';
function DTWAIN_FrameGetAllString(Frame:DTWAIN_FRAME; Left:LPTSTR; Top:LPTSTR; Right:LPTSTR; Bottom:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameGetAllString';
function DTWAIN_FrameGetAllStringA(Frame:DTWAIN_FRAME; Left:LPSTR; Top:LPSTR; Right:LPSTR; Bottom:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameGetAllStringA';
function DTWAIN_FrameGetAllStringW(Frame:DTWAIN_FRAME; Left:LPWSTR; Top:LPWSTR; Right:LPWSTR; Bottom:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameGetAllStringW';
function DTWAIN_FrameGetValue(Frame:DTWAIN_FRAME; nWhich:LONG; Value:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameGetValue';
function DTWAIN_FrameGetValueString(Frame:DTWAIN_FRAME; nWhich:LONG; Value:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameGetValueString';
function DTWAIN_FrameGetValueStringA(Frame:DTWAIN_FRAME; nWhich:LONG; Value:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameGetValueStringA';
function DTWAIN_FrameGetValueStringW(Frame:DTWAIN_FRAME; nWhich:LONG; Value:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameGetValueStringW';
function DTWAIN_FrameIsValid(Frame:DTWAIN_FRAME) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameIsValid';
function DTWAIN_FrameSetAll(Frame:DTWAIN_FRAME; Left:DTWAIN_FLOAT; Top:DTWAIN_FLOAT; Right:DTWAIN_FLOAT; Bottom:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameSetAll';
function DTWAIN_FrameSetAllString(Frame:DTWAIN_FRAME; Left:LPCTSTR; Top:LPCTSTR; Right:LPCTSTR; Bottom:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameSetAllString';
function DTWAIN_FrameSetAllStringA(Frame:DTWAIN_FRAME; Left:LPCSTR; Top:LPCSTR; Right:LPCSTR; Bottom:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameSetAllStringA';
function DTWAIN_FrameSetAllStringW(Frame:DTWAIN_FRAME; Left:LPCWSTR; Top:LPCWSTR; Right:LPCWSTR; Bottom:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameSetAllStringW';
function DTWAIN_FrameSetValue(Frame:DTWAIN_FRAME; nWhich:LONG; Value:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameSetValue';
function DTWAIN_FrameSetValueString(Frame:DTWAIN_FRAME; nWhich:LONG; Value:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameSetValueString';
function DTWAIN_FrameSetValueStringA(Frame:DTWAIN_FRAME; nWhich:LONG; Value:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameSetValueStringA';
function DTWAIN_FrameSetValueStringW(Frame:DTWAIN_FRAME; nWhich:LONG; Value:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FrameSetValueStringW';
function DTWAIN_FreeExtImageInfo(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FreeExtImageInfo';
function DTWAIN_FreeMemory(h:NativeInt) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FreeMemory';
function DTWAIN_FreeMemoryEx(h:NativeInt) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_FreeMemoryEx';
function DTWAIN_GetAPIHandleStatus(pHandle:DTWAIN_HANDLE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAPIHandleStatus';
function DTWAIN_GetAcquireArea(Source:DTWAIN_SOURCE; lGetType:LONG; FloatEnum:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireArea';
function DTWAIN_GetAcquireArea2(Source:DTWAIN_SOURCE; left:LPDTWAIN_FLOAT; top:LPDTWAIN_FLOAT; right:LPDTWAIN_FLOAT; bottom:LPDTWAIN_FLOAT; lpUnit:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireArea2';
function DTWAIN_GetAcquireArea2String(Source:DTWAIN_SOURCE; left:LPTSTR; top:LPTSTR; right:LPTSTR; bottom:LPTSTR; Unit_:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireArea2String';
function DTWAIN_GetAcquireArea2StringA(Source:DTWAIN_SOURCE; left:LPSTR; top:LPSTR; right:LPSTR; bottom:LPSTR; Unit_:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireArea2StringA';
function DTWAIN_GetAcquireArea2StringW(Source:DTWAIN_SOURCE; left:LPWSTR; top:LPWSTR; right:LPWSTR; bottom:LPWSTR; Unit_:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireArea2StringW';
function DTWAIN_GetAcquireAreaEx(Source:DTWAIN_SOURCE; lGetType:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireAreaEx';
function DTWAIN_GetAcquireMetrics(source:DTWAIN_SOURCE; ImageCount:LPLONG; SheetCount:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireMetrics';
function DTWAIN_GetAcquireStripBuffer(Source:DTWAIN_SOURCE) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireStripBuffer';
function DTWAIN_GetAcquireStripData(Source:DTWAIN_SOURCE; lpCompression:LPLONG; lpBytesPerRow:LPDWORD; lpColumns:LPDWORD; lpRows:LPDWORD; XOffset:LPDWORD; YOffset:LPDWORD; lpBytesWritten:LPDWORD) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireStripData';
function DTWAIN_GetAcquireStripSizes(Source:DTWAIN_SOURCE; lpMin:LPDWORD; lpMax:LPDWORD; lpPreferred:LPDWORD) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquireStripSizes';
function DTWAIN_GetAcquiredImage(aAcq:DTWAIN_ARRAY; nWhichAcq:LONG; nWhichDib:LONG) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquiredImage';
function DTWAIN_GetAcquiredImageArray(aAcq:DTWAIN_ARRAY; nWhichAcq:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquiredImageArray';
function DTWAIN_GetAcquisitionArray(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAcquisitionArray';
function DTWAIN_GetActiveDSMPath(lpszBuffer:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetActiveDSMPath';
function DTWAIN_GetActiveDSMPathA(lpszBuffer:LPSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetActiveDSMPathA';
function DTWAIN_GetActiveDSMPathW(lpszBuffer:LPWSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetActiveDSMPathW';
function DTWAIN_GetActiveDSMVersionInfo(szDLLInfo:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetActiveDSMVersionInfo';
function DTWAIN_GetActiveDSMVersionInfoA(lpszBuffer:LPSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetActiveDSMVersionInfoA';
function DTWAIN_GetActiveDSMVersionInfoW(lpszBuffer:LPWSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetActiveDSMVersionInfoW';
function DTWAIN_GetAlarmVolume(Source:DTWAIN_SOURCE; lpVolume:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAlarmVolume';
function DTWAIN_GetAllSourceDibs(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAllSourceDibs';
function DTWAIN_GetAppInfo(szVerStr:LPTSTR; szManu:LPTSTR; szProdFam:LPTSTR; szProdName:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAppInfo';
function DTWAIN_GetAppInfoA(szVerStr:LPSTR; szManu:LPSTR; szProdFam:LPSTR; szProdName:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAppInfoA';
function DTWAIN_GetAppInfoW(szVerStr:LPWSTR; szManu:LPWSTR; szProdFam:LPWSTR; szProdName:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAppInfoW';
function DTWAIN_GetAuthor(Source:DTWAIN_SOURCE; szAuthor:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAuthor';
function DTWAIN_GetAuthorA(Source:DTWAIN_SOURCE; szAuthor:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAuthorA';
function DTWAIN_GetAuthorW(Source:DTWAIN_SOURCE; szAuthor:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetAuthorW';
function DTWAIN_GetBarcodeMaxPriorities(Source:DTWAIN_SOURCE; pMaxPriorities:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBarcodeMaxPriorities';
function DTWAIN_GetBarcodeMaxRetries(Source:DTWAIN_SOURCE; pMaxRetries:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBarcodeMaxRetries';
function DTWAIN_GetBarcodePriorities(Source:DTWAIN_SOURCE; SearchPriorities:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBarcodePriorities';
function DTWAIN_GetBarcodeSearchMode(Source:DTWAIN_SOURCE; pSearchMode:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBarcodeSearchMode';
function DTWAIN_GetBarcodeTimeOut(Source:DTWAIN_SOURCE; pTimeOut:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBarcodeTimeOut';
function DTWAIN_GetBatteryMinutes(Source:DTWAIN_SOURCE; lpMinutes:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBatteryMinutes';
function DTWAIN_GetBatteryPercent(Source:DTWAIN_SOURCE; lpPercent:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBatteryPercent';
function DTWAIN_GetBitDepth(Source:DTWAIN_SOURCE; BitDepth:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBitDepth';
function DTWAIN_GetBitDepthEx(Source:DTWAIN_SOURCE; bCurrent:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBitDepthEx';
function DTWAIN_GetBlankPageAutoDetection(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBlankPageAutoDetection';
function DTWAIN_GetBrightness(Source:DTWAIN_SOURCE; Brightness:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBrightness';
function DTWAIN_GetBrightnessEx(Source:DTWAIN_SOURCE) : DTWAIN_FLOAT; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBrightnessEx';
function DTWAIN_GetBrightnessString(Source:DTWAIN_SOURCE; Brightness:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBrightnessString';
function DTWAIN_GetBrightnessStringA(Source:DTWAIN_SOURCE; Contrast:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBrightnessStringA';
function DTWAIN_GetBrightnessStringW(Source:DTWAIN_SOURCE; Contrast:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBrightnessStringW';
function DTWAIN_GetBufferedTransferInfo(Source:DTWAIN_SOURCE; Compression:LPDWORD; BytesPerRow:LPDWORD; Columns:LPDWORD; Rows:LPDWORD; XOffset:LPDWORD; YOffset:LPDWORD; Flags:LPDWORD; BytesWritten:LPDWORD; MemoryLength:LPDWORD) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetBufferedTransferInfo';
function DTWAIN_GetCallback : DTwainCallback; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCallback';
function DTWAIN_GetCallback64 : DTwainCallback64; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCallback64';
function DTWAIN_GetCapArrayType(Source:DTWAIN_SOURCE; nCap:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapArrayType';
function DTWAIN_GetCapContainer(Source:DTWAIN_SOURCE; nCap:LONG; lCapType:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapContainer';
function DTWAIN_GetCapContainerEx(nCap:LONG; bSetContainer:BOOL; ConTypes:LPDTWAIN_ARRAY) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapContainerEx';
function DTWAIN_GetCapContainerEx2(nCap:LONG; bSetContainer:BOOL) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapContainerEx2';
function DTWAIN_GetCapDataType(Source:DTWAIN_SOURCE; nCap:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapDataType';
function DTWAIN_GetCapFromName(szName:LPCTSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapFromName';
function DTWAIN_GetCapFromNameA(szName:LPCSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapFromNameA';
function DTWAIN_GetCapFromNameW(szName:LPCWSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapFromNameW';
function DTWAIN_GetCapHelp(lCapability:LONG; lpszOut:LPTSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapHelp';
function DTWAIN_GetCapHelpA(lCapability:LONG; lpszOut:LPSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapHelpA';
function DTWAIN_GetCapHelpW(lCapability:LONG; lpszOut:LPWSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapHelpW';
function DTWAIN_GetCapLabel(lCapability:LONG; lpszOut:LPTSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapLabel';
function DTWAIN_GetCapLabelA(lCapability:LONG; lpszOut:LPSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapLabelA';
function DTWAIN_GetCapLabelW(lCapability:LONG; lpszOut:LPWSTR; nnSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapLabelW';
function DTWAIN_GetCapOperations(Source:DTWAIN_SOURCE; lCapability:LONG; lpOps:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapOperations';
function DTWAIN_GetCapOperationsEx(Source:DTWAIN_SOURCE; lCapability:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapOperationsEx';
function DTWAIN_GetCapValues(Source:DTWAIN_SOURCE; lCap:LONG; lGetType:LONG; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapValues';
function DTWAIN_GetCapValuesEx(Source:DTWAIN_SOURCE; lCap:LONG; lGetType:LONG; lContainerType:LONG; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapValuesEx';
function DTWAIN_GetCapValuesEx2(Source:DTWAIN_SOURCE; lCap:LONG; lGetType:LONG; lContainerType:LONG; nDataType:LONG; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCapValuesEx2';
function DTWAIN_GetCaption(Source:DTWAIN_SOURCE; Caption:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCaption';
function DTWAIN_GetCaptionA(Source:DTWAIN_SOURCE; Caption:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCaptionA';
function DTWAIN_GetCaptionW(Source:DTWAIN_SOURCE; Caption:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCaptionW';
function DTWAIN_GetCompressionSize(Source:DTWAIN_SOURCE; lBytes:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCompressionSize';
function DTWAIN_GetCompressionType(Source:DTWAIN_SOURCE; lpCompression:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCompressionType';
function DTWAIN_GetCompressionTypeEx(Source:DTWAIN_SOURCE; bCurrent:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCompressionTypeEx';
function DTWAIN_GetConditionCodeString(lError:LONG; lpszBuffer:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetConditionCodeString';
function DTWAIN_GetConditionCodeStringA(lError:LONG; lpszBuffer:LPSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetConditionCodeStringA';
function DTWAIN_GetConditionCodeStringW(lError:LONG; lpszBuffer:LPWSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetConditionCodeStringW';
function DTWAIN_GetConstantFromTwainName(lpszBuffer:LPCTSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetConstantFromTwainName';
function DTWAIN_GetConstantFromTwainNameA(lpszBuffer:LPCSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetConstantFromTwainNameA';
function DTWAIN_GetConstantFromTwainNameW(lpszBuffer:LPCWSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetConstantFromTwainNameW';
function DTWAIN_GetContrast(Source:DTWAIN_SOURCE; Contrast:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetContrast';
function DTWAIN_GetContrastEx(Source:DTWAIN_SOURCE) : DTWAIN_FLOAT; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetContrastEx';
function DTWAIN_GetContrastString(Source:DTWAIN_SOURCE; Contrast:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetContrastString';
function DTWAIN_GetContrastStringA(Source:DTWAIN_SOURCE; Contrast:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetContrastStringA';
function DTWAIN_GetContrastStringW(Source:DTWAIN_SOURCE; Contrast:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetContrastStringW';
function DTWAIN_GetCountry : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCountry';
function DTWAIN_GetCurrentAcquiredImage(Source:DTWAIN_SOURCE) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCurrentAcquiredImage';
function DTWAIN_GetCurrentFileName(Source:DTWAIN_SOURCE; szName:LPTSTR; MaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCurrentFileName';
function DTWAIN_GetCurrentFileNameA(Source:DTWAIN_SOURCE; szName:LPSTR; MaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCurrentFileNameA';
function DTWAIN_GetCurrentFileNameW(Source:DTWAIN_SOURCE; szName:LPWSTR; MaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCurrentFileNameW';
function DTWAIN_GetCurrentPageNum(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCurrentPageNum';
function DTWAIN_GetCurrentRetryCount(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCurrentRetryCount';
function DTWAIN_GetCurrentTwainTriplet(pAppID:pTW_IDENTITY; pSourceID:pTW_IDENTITY; lpDG:LPLONG; lpDAT:LPLONG; lpMsg:LPLONG; lpMemRef:LPLONG64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCurrentTwainTriplet';
function DTWAIN_GetCustomDSData(Source:DTWAIN_SOURCE; Data:LPBYTE; dSize:DWORD; pActualSize:LPDWORD; nFlags:LONG) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetCustomDSData';
function DTWAIN_GetDSMFullName(DSMType:LONG; szDLLName:LPTSTR; nMaxLen:LONG; pWhichSearch:LPLONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDSMFullName';
function DTWAIN_GetDSMFullNameA(DSMType:LONG; szDLLName:LPSTR; nMaxLen:LONG; pWhichSearch:LPLONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDSMFullNameA';
function DTWAIN_GetDSMFullNameW(DSMType:LONG; szDLLName:LPWSTR; nMaxLen:LONG; pWhichSearch:LPLONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDSMFullNameW';
function DTWAIN_GetDSMSearchOrder : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDSMSearchOrder';
function DTWAIN_GetDSMSearchOrderEx(SearchOrder:LPTSTR; UserDirectory:LPTSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDSMSearchOrderEx';
function DTWAIN_GetDSMSearchOrderExA(SearchOrder:LPSTR; UserDirectory:LPSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDSMSearchOrderExA';
function DTWAIN_GetDSMSearchOrderExW(SearchOrder:LPWSTR; UserDirectory:LPWSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDSMSearchOrderExW';
function DTWAIN_GetDTWAINHandle : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDTWAINHandle';
function DTWAIN_GetDeviceEvent(Source:DTWAIN_SOURCE; lpEvent:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDeviceEvent';
function DTWAIN_GetDeviceEventEx(Source:DTWAIN_SOURCE; lpEvent:LPLONG; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDeviceEventEx';
function DTWAIN_GetDeviceEventInfo(Source:DTWAIN_SOURCE; nWhichInfo:LONG; pValue:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDeviceEventInfo';
function DTWAIN_GetDeviceNotifications(Source:DTWAIN_SOURCE; DevEvents:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDeviceNotifications';
function DTWAIN_GetDeviceTimeDate(Source:DTWAIN_SOURCE; szTimeDate:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDeviceTimeDate';
function DTWAIN_GetDeviceTimeDateA(Source:DTWAIN_SOURCE; szTimeDate:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDeviceTimeDateA';
function DTWAIN_GetDeviceTimeDateW(Source:DTWAIN_SOURCE; szTimeDate:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDeviceTimeDateW';
function DTWAIN_GetDoubleFeedDetectLength(Source:DTWAIN_SOURCE; Value:LPDTWAIN_FLOAT; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDoubleFeedDetectLength';
function DTWAIN_GetDoubleFeedDetectValues(Source:DTWAIN_SOURCE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDoubleFeedDetectValues';
function DTWAIN_GetDuplexType(Source:DTWAIN_SOURCE; lpDupType:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDuplexType';
function DTWAIN_GetDuplexTypeEx(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetDuplexTypeEx';
function DTWAIN_GetErrorBuffer(ArrayBuffer:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetErrorBuffer';
function DTWAIN_GetErrorBufferThreshold : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetErrorBufferThreshold';
function DTWAIN_GetErrorCallback : DTwainErrorProc; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetErrorCallback';
function DTWAIN_GetErrorCallback64 : DTwainErrorProc64; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetErrorCallback64';
function DTWAIN_GetErrorString(lError:LONG; lpszBuffer:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetErrorString';
function DTWAIN_GetErrorStringA(lError:LONG; lpszBuffer:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetErrorStringA';
function DTWAIN_GetErrorStringW(lError:LONG; lpszBuffer:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetErrorStringW';
function DTWAIN_GetExtCapFromName(szName:LPCTSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtCapFromName';
function DTWAIN_GetExtCapFromNameA(szName:LPCSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtCapFromNameA';
function DTWAIN_GetExtCapFromNameW(szName:LPCWSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtCapFromNameW';
function DTWAIN_GetExtImageInfo(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtImageInfo';
function DTWAIN_GetExtImageInfoData(Source:DTWAIN_SOURCE; nWhich:LONG; Data:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtImageInfoData';
function DTWAIN_GetExtImageInfoDataEx(Source:DTWAIN_SOURCE; nWhich:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtImageInfoDataEx';
function DTWAIN_GetExtImageInfoItem(Source:DTWAIN_SOURCE; nWhich:LONG; InfoID:LPLONG; NumItems:LPLONG; Type_:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtImageInfoItem';
function DTWAIN_GetExtImageInfoItemEx(Source:DTWAIN_SOURCE; nWhich:LONG; InfoID:LPLONG; NumItems:LPLONG; Type_:LPLONG; ReturnCode:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtImageInfoItemEx';
function DTWAIN_GetExtNameFromCap(nValue:LONG; szValue:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtNameFromCap';
function DTWAIN_GetExtNameFromCapA(nValue:LONG; szValue:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtNameFromCapA';
function DTWAIN_GetExtNameFromCapW(nValue:LONG; szValue:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetExtNameFromCapW';
function DTWAIN_GetFeederAlignment(Source:DTWAIN_SOURCE; lpAlignment:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFeederAlignment';
function DTWAIN_GetFeederFuncs(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFeederFuncs';
function DTWAIN_GetFeederOrder(Source:DTWAIN_SOURCE; lpOrder:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFeederOrder';
function DTWAIN_GetFeederWaitTime(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFeederWaitTime';
function DTWAIN_GetFileCompressionType(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFileCompressionType';
function DTWAIN_GetFileSavePageCount(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFileSavePageCount';
function DTWAIN_GetFileTypeExtensions(nType:LONG; lpszName:LPTSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFileTypeExtensions';
function DTWAIN_GetFileTypeExtensionsA(nType:LONG; lpszName:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFileTypeExtensionsA';
function DTWAIN_GetFileTypeExtensionsW(nType:LONG; lpszName:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFileTypeExtensionsW';
function DTWAIN_GetFileTypeName(nType:LONG; lpszName:LPTSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFileTypeName';
function DTWAIN_GetFileTypeNameA(nType:LONG; lpszName:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFileTypeNameA';
function DTWAIN_GetFileTypeNameW(nType:LONG; lpszName:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetFileTypeNameW';
function DTWAIN_GetHalftone(Source:DTWAIN_SOURCE; lpHalftone:LPTSTR; GetType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetHalftone';
function DTWAIN_GetHalftoneA(Source:DTWAIN_SOURCE; lpHalftone:LPSTR; GetType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetHalftoneA';
function DTWAIN_GetHalftoneW(Source:DTWAIN_SOURCE; lpHalftone:LPWSTR; GetType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetHalftoneW';
function DTWAIN_GetHighlight(Source:DTWAIN_SOURCE; Highlight:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetHighlight';
function DTWAIN_GetHighlightString(Source:DTWAIN_SOURCE; Highlight:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetHighlightString';
function DTWAIN_GetHighlightStringA(Source:DTWAIN_SOURCE; Highlight:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetHighlightStringA';
function DTWAIN_GetHighlightStringW(Source:DTWAIN_SOURCE; Highlight:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetHighlightStringW';
function DTWAIN_GetImageInfo(Source:DTWAIN_SOURCE; lpXResolution:LPDTWAIN_FLOAT; lpYResolution:LPDTWAIN_FLOAT; lpWidth:LPLONG; lpLength:LPLONG; lpNumSamples:LPLONG; lpBitsPerSample:LPDTWAIN_ARRAY; lpBitsPerPixel:LPLONG; lpPlanar:LPLONG; lpPixelType:LPLONG; lpCompression:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetImageInfo';
function DTWAIN_GetImageInfoString(Source:DTWAIN_SOURCE; lpXResolution:LPTSTR; lpYResolution:LPTSTR; lpWidth:LPLONG; lpLength:LPLONG; lpNumSamples:LPLONG; lpBitsPerSample:LPDTWAIN_ARRAY; lpBitsPerPixel:LPLONG; lpPlanar:LPLONG; lpPixelType:LPLONG; lpCompression:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetImageInfoString';
function DTWAIN_GetImageInfoStringA(Source:DTWAIN_SOURCE; lpXResolution:LPSTR; lpYResolution:LPSTR; lpWidth:LPLONG; lpLength:LPLONG; lpNumSamples:LPLONG; lpBitsPerSample:LPDTWAIN_ARRAY; lpBitsPerPixel:LPLONG; lpPlanar:LPLONG; lpPixelType:LPLONG; lpCompression:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetImageInfoStringA';
function DTWAIN_GetImageInfoStringW(Source:DTWAIN_SOURCE; lpXResolution:LPWSTR; lpYResolution:LPWSTR; lpWidth:LPLONG; lpLength:LPLONG; lpNumSamples:LPLONG; lpBitsPerSample:LPDTWAIN_ARRAY; lpBitsPerPixel:LPLONG; lpPlanar:LPLONG; lpPixelType:LPLONG; lpCompression:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetImageInfoStringW';
function DTWAIN_GetJobControl(Source:DTWAIN_SOURCE; pJobControl:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetJobControl';
function DTWAIN_GetJobControlEx(Source:DTWAIN_SOURCE; bGetCurrent:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetJobControlEx';
function DTWAIN_GetJpegValues(Source:DTWAIN_SOURCE; pQuality:LPLONG; Progressive:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetJpegValues';
function DTWAIN_GetJpegXRValues(Source:DTWAIN_SOURCE; pQuality:LPLONG; Progressive:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetJpegXRValues';
function DTWAIN_GetLanguage : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLanguage';
function DTWAIN_GetLastError : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLastError';
function DTWAIN_GetLibraryPath(lpszVer:LPTSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLibraryPath';
function DTWAIN_GetLibraryPathA(lpszVer:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLibraryPathA';
function DTWAIN_GetLibraryPathW(lpszVer:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLibraryPathW';
function DTWAIN_GetLightPath(Source:DTWAIN_SOURCE; lpLightPath:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLightPath';
function DTWAIN_GetLightPathEx(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLightPathEx';
function DTWAIN_GetLightSource(Source:DTWAIN_SOURCE; LightSource:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLightSource';
function DTWAIN_GetLightSources(Source:DTWAIN_SOURCE; LightSources:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLightSources';
function DTWAIN_GetLightSourcesEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLightSourcesEx';
function DTWAIN_GetLoggerCallback : DTwainLoggerProc; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLoggerCallback';
function DTWAIN_GetLoggerCallbackA : DTwainLoggerProcA; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLoggerCallbackA';
function DTWAIN_GetLoggerCallbackW : DTwainLoggerProcW; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetLoggerCallbackW';
function DTWAIN_GetManualDuplexCount(Source:DTWAIN_SOURCE; pSide1:LPLONG; pSide2:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetManualDuplexCount';
function DTWAIN_GetMaxAcquisitions(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetMaxAcquisitions';
function DTWAIN_GetMaxBuffers(Source:DTWAIN_SOURCE; pMaxBuf:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetMaxBuffers';
function DTWAIN_GetMaxPagesToAcquire(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetMaxPagesToAcquire';
function DTWAIN_GetMaxRetryAttempts(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetMaxRetryAttempts';
function DTWAIN_GetNameFromCap(nCapValue:LONG; szValue:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetNameFromCap';
function DTWAIN_GetNameFromCapA(nCapValue:LONG; szValue:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetNameFromCapA';
function DTWAIN_GetNameFromCapW(nCapValue:LONG; szValue:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetNameFromCapW';
function DTWAIN_GetNoiseFilter(Source:DTWAIN_SOURCE; lpNoiseFilter:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetNoiseFilter';
function DTWAIN_GetNumAcquiredImages(aAcq:DTWAIN_ARRAY; nWhich:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetNumAcquiredImages';
function DTWAIN_GetNumAcquisitions(aAcq:DTWAIN_ARRAY) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetNumAcquisitions';
function DTWAIN_GetOCRCapValues(Engine:DTWAIN_OCRENGINE; OCRCapValue:LONG; GetType:LONG; CapValues:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRCapValues';
function DTWAIN_GetOCRErrorString(Engine:DTWAIN_OCRENGINE; lError:LONG; lpszBuffer:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRErrorString';
function DTWAIN_GetOCRErrorStringA(Engine:DTWAIN_OCRENGINE; lError:LONG; lpszBuffer:LPSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRErrorStringA';
function DTWAIN_GetOCRErrorStringW(Engine:DTWAIN_OCRENGINE; lError:LONG; lpszBuffer:LPWSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRErrorStringW';
function DTWAIN_GetOCRLastError(Engine:DTWAIN_OCRENGINE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRLastError';
function DTWAIN_GetOCRMajorMinorVersion(Engine:DTWAIN_OCRENGINE; lpMajor:LPLONG; lpMinor:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRMajorMinorVersion';
function DTWAIN_GetOCRManufacturer(Engine:DTWAIN_OCRENGINE; szManufacturer:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRManufacturer';
function DTWAIN_GetOCRManufacturerA(Engine:DTWAIN_OCRENGINE; szManufacturer:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRManufacturerA';
function DTWAIN_GetOCRManufacturerW(Engine:DTWAIN_OCRENGINE; szManufacturer:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRManufacturerW';
function DTWAIN_GetOCRProductFamily(Engine:DTWAIN_OCRENGINE; szProductFamily:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRProductFamily';
function DTWAIN_GetOCRProductFamilyA(Engine:DTWAIN_OCRENGINE; szProductFamily:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRProductFamilyA';
function DTWAIN_GetOCRProductFamilyW(Engine:DTWAIN_OCRENGINE; szProductFamily:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRProductFamilyW';
function DTWAIN_GetOCRProductName(Engine:DTWAIN_OCRENGINE; szProductName:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRProductName';
function DTWAIN_GetOCRProductNameA(Engine:DTWAIN_OCRENGINE; szProductName:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRProductNameA';
function DTWAIN_GetOCRProductNameW(Engine:DTWAIN_OCRENGINE; szProductName:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRProductNameW';
function DTWAIN_GetOCRText(Engine:DTWAIN_OCRENGINE; nPageNo:LONG; Data:LPTSTR; dSize:LONG; pActualSize:LPLONG; nFlags:LONG) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRText';
function DTWAIN_GetOCRTextA(Engine:DTWAIN_OCRENGINE; nPageNo:LONG; Data:LPSTR; dSize:LONG; pActualSize:LPLONG; nFlags:LONG) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRTextA';
function DTWAIN_GetOCRTextInfoFloat(OCRTextInfo:DTWAIN_OCRTEXTINFOHANDLE; nCharPos:LONG; nWhichItem:LONG; pInfo:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRTextInfoFloat';
function DTWAIN_GetOCRTextInfoFloatEx(OCRTextInfo:DTWAIN_OCRTEXTINFOHANDLE; nWhichItem:LONG; pInfo:LPDTWAIN_FLOAT; bufSize:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRTextInfoFloatEx';
function DTWAIN_GetOCRTextInfoHandle(Engine:DTWAIN_OCRENGINE; nPageNo:LONG) : DTWAIN_OCRTEXTINFOHANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRTextInfoHandle';
function DTWAIN_GetOCRTextInfoLong(OCRTextInfo:DTWAIN_OCRTEXTINFOHANDLE; nCharPos:LONG; nWhichItem:LONG; pInfo:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRTextInfoLong';
function DTWAIN_GetOCRTextInfoLongEx(OCRTextInfo:DTWAIN_OCRTEXTINFOHANDLE; nWhichItem:LONG; pInfo:LPLONG; bufSize:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRTextInfoLongEx';
function DTWAIN_GetOCRTextW(Engine:DTWAIN_OCRENGINE; nPageNo:LONG; Data:LPWSTR; dSize:LONG; pActualSize:LPLONG; nFlags:LONG) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRTextW';
function DTWAIN_GetOCRVersionInfo(Engine:DTWAIN_OCRENGINE; buffer:LPTSTR; maxBufSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRVersionInfo';
function DTWAIN_GetOCRVersionInfoA(Engine:DTWAIN_OCRENGINE; buffer:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRVersionInfoA';
function DTWAIN_GetOCRVersionInfoW(Engine:DTWAIN_OCRENGINE; buffer:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOCRVersionInfoW';
function DTWAIN_GetOrientation(Source:DTWAIN_SOURCE; lpOrient:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOrientation';
function DTWAIN_GetOrientationEx(Source:DTWAIN_SOURCE; bCurrent:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOrientationEx';
function DTWAIN_GetOverscan(Source:DTWAIN_SOURCE; lpOverscan:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetOverscan';
function DTWAIN_GetPDFTextElementFloat(TextElement:DTWAIN_PDFTEXTELEMENT; val1:LPDTWAIN_FLOAT; val2:LPDTWAIN_FLOAT; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPDFTextElementFloat';
function DTWAIN_GetPDFTextElementLong(TextElement:DTWAIN_PDFTEXTELEMENT; val1:LPLONG; val2:LPLONG; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPDFTextElementLong';
function DTWAIN_GetPDFTextElementString(TextElement:DTWAIN_PDFTEXTELEMENT; szData:LPTSTR; maxLen:LONG; Flags:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPDFTextElementString';
function DTWAIN_GetPDFTextElementStringA(TextElement:DTWAIN_PDFTEXTELEMENT; szData:LPSTR; maxLen:LONG; Flags:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPDFTextElementStringA';
function DTWAIN_GetPDFTextElementStringW(TextElement:DTWAIN_PDFTEXTELEMENT; szData:LPWSTR; maxLen:LONG; Flags:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPDFTextElementStringW';
function DTWAIN_GetPDFType1FontName(FontVal:LONG; szFont:LPTSTR; nChars:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPDFType1FontName';
function DTWAIN_GetPDFType1FontNameA(FontVal:LONG; szFont:LPSTR; nChars:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPDFType1FontNameA';
function DTWAIN_GetPDFType1FontNameW(FontVal:LONG; szFont:LPWSTR; nChars:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPDFType1FontNameW';
function DTWAIN_GetPaperSize(Source:DTWAIN_SOURCE; lpPaperSize:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPaperSize';
function DTWAIN_GetPaperSizeName(paperNumber:LONG; outName:LPTSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPaperSizeName';
function DTWAIN_GetPaperSizeNameA(paperNumber:LONG; outName:LPSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPaperSizeNameA';
function DTWAIN_GetPaperSizeNameW(paperNumber:LONG; outName:LPWSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPaperSizeNameW';
function DTWAIN_GetPatchcodeMaxPriorities(Source:DTWAIN_SOURCE; pMaxPriorities:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPatchcodeMaxPriorities';
function DTWAIN_GetPatchcodeMaxRetries(Source:DTWAIN_SOURCE; pMaxRetries:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPatchcodeMaxRetries';
function DTWAIN_GetPatchcodePriorities(Source:DTWAIN_SOURCE; SearchPriorities:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPatchcodePriorities';
function DTWAIN_GetPatchcodeSearchMode(Source:DTWAIN_SOURCE; pSearchMode:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPatchcodeSearchMode';
function DTWAIN_GetPatchcodeTimeOut(Source:DTWAIN_SOURCE; pTimeOut:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPatchcodeTimeOut';
function DTWAIN_GetPixelFlavor(Source:DTWAIN_SOURCE; lpPixelFlavor:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPixelFlavor';
function DTWAIN_GetPixelType(Source:DTWAIN_SOURCE; PixelType:LPLONG; BitDepth:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPixelType';
function DTWAIN_GetPrinter(Source:DTWAIN_SOURCE; lpPrinter:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinter';
function DTWAIN_GetPrinterEx(Source:DTWAIN_SOURCE; bCurrent:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterEx';
function DTWAIN_GetPrinterStartNumber(Source:DTWAIN_SOURCE; nStart:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterStartNumber';
function DTWAIN_GetPrinterStartNumberEx(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterStartNumberEx';
function DTWAIN_GetPrinterStringMode(Source:DTWAIN_SOURCE; PrinterMode:LPLONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterStringMode';
function DTWAIN_GetPrinterStringModeEx(Source:DTWAIN_SOURCE; bCurrent:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterStringModeEx';
function DTWAIN_GetPrinterStrings(Source:DTWAIN_SOURCE; ArrayString:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterStrings';
function DTWAIN_GetPrinterStringsEx(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterStringsEx';
function DTWAIN_GetPrinterSuffixString(Source:DTWAIN_SOURCE; Suffix:LPTSTR; nMaxLen:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterSuffixString';
function DTWAIN_GetPrinterSuffixStringA(Source:DTWAIN_SOURCE; Suffix:LPSTR; nLength:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterSuffixStringA';
function DTWAIN_GetPrinterSuffixStringW(Source:DTWAIN_SOURCE; Suffix:LPWSTR; nLength:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetPrinterSuffixStringW';
function DTWAIN_GetRegisteredMsg : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetRegisteredMsg';
function DTWAIN_GetResolution(Source:DTWAIN_SOURCE; Resolution:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetResolution';
function DTWAIN_GetResolutionEx(Source:DTWAIN_SOURCE) : DTWAIN_FLOAT; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetResolutionEx';
function DTWAIN_GetResolutionString(Source:DTWAIN_SOURCE; Resolution:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetResolutionString';
function DTWAIN_GetResolutionStringA(Source:DTWAIN_SOURCE; Resolution:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetResolutionStringA';
function DTWAIN_GetResolutionStringW(Source:DTWAIN_SOURCE; Resolution:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetResolutionStringW';
function DTWAIN_GetResourceString(ResourceID:LONG; lpszBuffer:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetResourceString';
function DTWAIN_GetResourceStringA(ResourceID:LONG; lpszBuffer:LPSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetResourceStringA';
function DTWAIN_GetResourceStringW(ResourceID:LONG; lpszBuffer:LPWSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetResourceStringW';
function DTWAIN_GetRotation(Source:DTWAIN_SOURCE; Rotation:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetRotation';
function DTWAIN_GetRotationEx(Source:DTWAIN_SOURCE) : DTWAIN_FLOAT; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetRotationEx';
function DTWAIN_GetRotationString(Source:DTWAIN_SOURCE; Rotation:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetRotationString';
function DTWAIN_GetRotationStringA(Source:DTWAIN_SOURCE; Rotation:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetRotationStringA';
function DTWAIN_GetRotationStringW(Source:DTWAIN_SOURCE; Rotation:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetRotationStringW';
function DTWAIN_GetSaveFileName(Source:DTWAIN_SOURCE; fName:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSaveFileName';
function DTWAIN_GetSaveFileNameA(Source:DTWAIN_SOURCE; fName:LPSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSaveFileNameA';
function DTWAIN_GetSaveFileNameW(Source:DTWAIN_SOURCE; fName:LPWSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSaveFileNameW';
function DTWAIN_GetSessionDetails(szBuf:LPTSTR; nSize:LONG; indentFactor:LONG; bRefresh:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSessionDetails';
function DTWAIN_GetSessionDetailsA(szBuf:LPSTR; nSize:LONG; indentFactor:LONG; bRefresh:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSessionDetailsA';
function DTWAIN_GetSessionDetailsW(szBuf:LPWSTR; nSize:LONG; indentFactor:LONG; bRefresh:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSessionDetailsW';
function DTWAIN_GetShadow(Source:DTWAIN_SOURCE; Shadow:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetShadow';
function DTWAIN_GetShadowString(Source:DTWAIN_SOURCE; Shadow:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetShadowString';
function DTWAIN_GetShadowStringA(Source:DTWAIN_SOURCE; Shadow:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetShadowStringA';
function DTWAIN_GetShadowStringW(Source:DTWAIN_SOURCE; Shadow:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetShadowStringW';
function DTWAIN_GetShortVersionString(lpszVer:LPTSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetShortVersionString';
function DTWAIN_GetShortVersionStringA(lpszVer:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetShortVersionStringA';
function DTWAIN_GetShortVersionStringW(lpszVer:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetShortVersionStringW';
function DTWAIN_GetSourceAcquisitions(Source:DTWAIN_SOURCE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceAcquisitions';
function DTWAIN_GetSourceDetails(szSources:LPCTSTR; szBuf:LPTSTR; nSize:LONG; indentFactor:LONG; bRefresh:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceDetails';
function DTWAIN_GetSourceDetailsA(szSources:LPCSTR; szBuf:LPSTR; nSize:LONG; indentFactor:LONG; bRefresh:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceDetailsA';
function DTWAIN_GetSourceDetailsW(szSources:LPCWSTR; szBuf:LPWSTR; nSize:LONG; indentFactor:LONG; bRefresh:BOOL) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceDetailsW';
function DTWAIN_GetSourceID(Source:DTWAIN_SOURCE) : DTWAIN_IDENTITY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceID';
function DTWAIN_GetSourceIDEx(Source:DTWAIN_SOURCE; pIdentity:pTW_IDENTITY) : TWAIN_IDENTITY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceIDEx';
function DTWAIN_GetSourceManufacturer(Source:DTWAIN_SOURCE; szProduct:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceManufacturer';
function DTWAIN_GetSourceManufacturerA(Source:DTWAIN_SOURCE; szProduct:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceManufacturerA';
function DTWAIN_GetSourceManufacturerW(Source:DTWAIN_SOURCE; szProduct:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceManufacturerW';
function DTWAIN_GetSourceProductFamily(Source:DTWAIN_SOURCE; szProduct:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceProductFamily';
function DTWAIN_GetSourceProductFamilyA(Source:DTWAIN_SOURCE; szProduct:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceProductFamilyA';
function DTWAIN_GetSourceProductFamilyW(Source:DTWAIN_SOURCE; szProduct:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceProductFamilyW';
function DTWAIN_GetSourceProductName(Source:DTWAIN_SOURCE; szProduct:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceProductName';
function DTWAIN_GetSourceProductNameA(Source:DTWAIN_SOURCE; szProduct:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceProductNameA';
function DTWAIN_GetSourceProductNameW(Source:DTWAIN_SOURCE; szProduct:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceProductNameW';
function DTWAIN_GetSourceUnit(Source:DTWAIN_SOURCE; lpUnit:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceUnit';
function DTWAIN_GetSourceUnitEx(Source:DTWAIN_SOURCE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceUnitEx';
function DTWAIN_GetSourceVersionInfo(Source:DTWAIN_SOURCE; szProduct:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceVersionInfo';
function DTWAIN_GetSourceVersionInfoA(Source:DTWAIN_SOURCE; szProduct:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceVersionInfoA';
function DTWAIN_GetSourceVersionInfoW(Source:DTWAIN_SOURCE; szProduct:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceVersionInfoW';
function DTWAIN_GetSourceVersionNumber(Source:DTWAIN_SOURCE; pMajor:LPLONG; pMinor:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetSourceVersionNumber';
function DTWAIN_GetStaticLibVersion : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetStaticLibVersion';
function DTWAIN_GetTempFileDirectory(szFilePath:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTempFileDirectory';
function DTWAIN_GetTempFileDirectoryA(szFilePath:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTempFileDirectoryA';
function DTWAIN_GetTempFileDirectoryW(szFilePath:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTempFileDirectoryW';
function DTWAIN_GetThreshold(Source:DTWAIN_SOURCE; Threshold:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetThreshold';
function DTWAIN_GetThresholdString(Source:DTWAIN_SOURCE; Threshold:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetThresholdString';
function DTWAIN_GetThresholdStringA(Source:DTWAIN_SOURCE; Threshold:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetThresholdStringA';
function DTWAIN_GetThresholdStringW(Source:DTWAIN_SOURCE; Threshold:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetThresholdStringW';
function DTWAIN_GetTimeDate(Source:DTWAIN_SOURCE; szTimeDate:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTimeDate';
function DTWAIN_GetTimeDateA(Source:DTWAIN_SOURCE; szTimeDate:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTimeDateA';
function DTWAIN_GetTimeDateW(Source:DTWAIN_SOURCE; szTimeDate:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTimeDateW';
function DTWAIN_GetTwainAppID : DTWAIN_IDENTITY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainAppID';
function DTWAIN_GetTwainAppIDEx(pIdentity:pTW_IDENTITY) : TWAIN_IDENTITY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainAppIDEx';
function DTWAIN_GetTwainAvailability : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainAvailability';
function DTWAIN_GetTwainAvailabilityEx(directories:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainAvailabilityEx';
function DTWAIN_GetTwainAvailabilityExA(szDirectories:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainAvailabilityExA';
function DTWAIN_GetTwainAvailabilityExW(szDirectories:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainAvailabilityExW';
function DTWAIN_GetTwainHwnd : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainHwnd';
function DTWAIN_GetTwainMode : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainMode';
function DTWAIN_GetTwainNameFromConstant(lConstantType:LONG; lTwainConstant:LONG; lpszOut:LPTSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainNameFromConstant';
function DTWAIN_GetTwainNameFromConstantA(lConstantType:LONG; lTwainConstant:LONG; lpszOut:LPSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainNameFromConstantA';
function DTWAIN_GetTwainNameFromConstantEx(lConstantType:LONG; lTwainConstant:LONG; lpszOut:LPTSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainNameFromConstantEx';
function DTWAIN_GetTwainNameFromConstantExA(lConstantType:LONG; lTwainConstant:LONG; lpszOut:LPSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainNameFromConstantExA';
function DTWAIN_GetTwainNameFromConstantExW(lConstantType:LONG; lTwainConstant:LONG; lpszOut:LPWSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainNameFromConstantExW';
function DTWAIN_GetTwainNameFromConstantW(lConstantType:LONG; lTwainConstant:LONG; lpszOut:LPWSTR; nSize:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainNameFromConstantW';
function DTWAIN_GetTwainTimeout : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetTwainTimeout';
function DTWAIN_GetVersion(lpMajor:LPLONG; lpMinor:LPLONG; lpVersionType:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersion';
function DTWAIN_GetVersionCopyright(lpszApp:LPTSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionCopyright';
function DTWAIN_GetVersionCopyrightA(lpszApp:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionCopyrightA';
function DTWAIN_GetVersionCopyrightW(lpszApp:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionCopyrightW';
function DTWAIN_GetVersionEx(lMajor:LPLONG; lMinor:LPLONG; lVersionType:LPLONG; lPatchLevel:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionEx';
function DTWAIN_GetVersionInfo(lpszVer:LPTSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionInfo';
function DTWAIN_GetVersionInfoA(lpszVer:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionInfoA';
function DTWAIN_GetVersionInfoW(lpszVer:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionInfoW';
function DTWAIN_GetVersionString(lpszVer:LPTSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionString';
function DTWAIN_GetVersionStringA(lpszVer:LPSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionStringA';
function DTWAIN_GetVersionStringW(lpszVer:LPWSTR; nLength:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetVersionStringW';
function DTWAIN_GetWindowsVersionInfo(lpszBuffer:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetWindowsVersionInfo';
function DTWAIN_GetWindowsVersionInfoA(lpszBuffer:LPSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetWindowsVersionInfoA';
function DTWAIN_GetWindowsVersionInfoW(lpszBuffer:LPWSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetWindowsVersionInfoW';
function DTWAIN_GetXResolution(Source:DTWAIN_SOURCE; Resolution:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetXResolution';
function DTWAIN_GetXResolutionString(Source:DTWAIN_SOURCE; Resolution:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetXResolutionString';
function DTWAIN_GetXResolutionStringA(Source:DTWAIN_SOURCE; Resolution:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetXResolutionStringA';
function DTWAIN_GetXResolutionStringW(Source:DTWAIN_SOURCE; Resolution:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetXResolutionStringW';
function DTWAIN_GetYResolution(Source:DTWAIN_SOURCE; Resolution:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetYResolution';
function DTWAIN_GetYResolutionString(Source:DTWAIN_SOURCE; Resolution:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetYResolutionString';
function DTWAIN_GetYResolutionStringA(Source:DTWAIN_SOURCE; Resolution:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetYResolutionStringA';
function DTWAIN_GetYResolutionStringW(Source:DTWAIN_SOURCE; Resolution:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_GetYResolutionStringW';
function DTWAIN_InitExtImageInfo(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_InitExtImageInfo';
function DTWAIN_InitImageFileAppend(szFile:LPCTSTR; fType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_InitImageFileAppend';
function DTWAIN_InitImageFileAppendA(szFile:LPCSTR; fType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_InitImageFileAppendA';
function DTWAIN_InitImageFileAppendW(szFile:LPCWSTR; fType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_InitImageFileAppendW';
function DTWAIN_InitOCRInterface : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_InitOCRInterface';
function DTWAIN_IsAcquiring : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAcquiring';
function DTWAIN_IsAudioXferSupported(Source:DTWAIN_SOURCE; supportVal:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAudioXferSupported';
function DTWAIN_IsAutoBorderDetectEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoBorderDetectEnabled';
function DTWAIN_IsAutoBorderDetectSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoBorderDetectSupported';
function DTWAIN_IsAutoBrightEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoBrightEnabled';
function DTWAIN_IsAutoBrightSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoBrightSupported';
function DTWAIN_IsAutoDeskewEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoDeskewEnabled';
function DTWAIN_IsAutoDeskewSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoDeskewSupported';
function DTWAIN_IsAutoFeedEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoFeedEnabled';
function DTWAIN_IsAutoFeedSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoFeedSupported';
function DTWAIN_IsAutoRotateEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoRotateEnabled';
function DTWAIN_IsAutoRotateSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoRotateSupported';
function DTWAIN_IsAutoScanEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutoScanEnabled';
function DTWAIN_IsAutomaticSenseMediumEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutomaticSenseMediumEnabled';
function DTWAIN_IsAutomaticSenseMediumSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsAutomaticSenseMediumSupported';
function DTWAIN_IsBarcodeCapsSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsBarcodeCapsSupported';
function DTWAIN_IsBarcodeDetectionEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsBarcodeDetectionEnabled';
function DTWAIN_IsBarcodeSupported(Source:DTWAIN_SOURCE; BarCode:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsBarcodeSupported';
function DTWAIN_IsBlankPageDetectionOn(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsBlankPageDetectionOn';
function DTWAIN_IsBufferedTileModeOn(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsBufferedTileModeOn';
function DTWAIN_IsBufferedTileModeSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsBufferedTileModeSupported';
function DTWAIN_IsCapSupported(Source:DTWAIN_SOURCE; lCapability:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsCapSupported';
function DTWAIN_IsCompressionSupported(Source:DTWAIN_SOURCE; Compression:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsCompressionSupported';
function DTWAIN_IsCustomDSDataSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsCustomDSDataSupported';
function DTWAIN_IsDIBBlank(hDib:NativeInt; threshold:DTWAIN_FLOAT) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDIBBlank';
function DTWAIN_IsDIBBlankString(hDib:NativeInt; threshold:LPCTSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDIBBlankString';
function DTWAIN_IsDIBBlankStringA(hDib:NativeInt; threshold:LPCSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDIBBlankStringA';
function DTWAIN_IsDIBBlankStringW(hDib:NativeInt; threshold:LPCWSTR) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDIBBlankStringW';
function DTWAIN_IsDeviceEventSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDeviceEventSupported';
function DTWAIN_IsDeviceOnLine(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDeviceOnLine';
function DTWAIN_IsDoubleFeedDetectLengthSupported(Source:DTWAIN_SOURCE; value:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDoubleFeedDetectLengthSupported';
function DTWAIN_IsDoubleFeedDetectSupported(Source:DTWAIN_SOURCE; SupportVal:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDoubleFeedDetectSupported';
function DTWAIN_IsDoublePageCountOnDuplex(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDoublePageCountOnDuplex';
function DTWAIN_IsDuplexEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDuplexEnabled';
function DTWAIN_IsDuplexSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsDuplexSupported';
function DTWAIN_IsExtImageInfoSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsExtImageInfoSupported';
function DTWAIN_IsFeederEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsFeederEnabled';
function DTWAIN_IsFeederLoaded(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsFeederLoaded';
function DTWAIN_IsFeederSensitive(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsFeederSensitive';
function DTWAIN_IsFeederSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsFeederSupported';
function DTWAIN_IsFileSystemSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsFileSystemSupported';
function DTWAIN_IsFileXferSupported(Source:DTWAIN_SOURCE; lFileType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsFileXferSupported';
function DTWAIN_IsGetMessageLoopDetectionOn : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsGetMessageLoopDetectionOn';
function DTWAIN_IsGetMessageLoopEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsGetMessageLoopEnabled';
function DTWAIN_IsIAFieldALastPageSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldALastPageSupported';
function DTWAIN_IsIAFieldALevelSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldALevelSupported';
function DTWAIN_IsIAFieldAPrintFormatSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldAPrintFormatSupported';
function DTWAIN_IsIAFieldAValueSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldAValueSupported';
function DTWAIN_IsIAFieldBLastPageSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldBLastPageSupported';
function DTWAIN_IsIAFieldBLevelSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldBLevelSupported';
function DTWAIN_IsIAFieldBPrintFormatSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldBPrintFormatSupported';
function DTWAIN_IsIAFieldBValueSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldBValueSupported';
function DTWAIN_IsIAFieldCLastPageSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldCLastPageSupported';
function DTWAIN_IsIAFieldCLevelSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldCLevelSupported';
function DTWAIN_IsIAFieldCPrintFormatSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldCPrintFormatSupported';
function DTWAIN_IsIAFieldCValueSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldCValueSupported';
function DTWAIN_IsIAFieldDLastPageSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldDLastPageSupported';
function DTWAIN_IsIAFieldDLevelSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldDLevelSupported';
function DTWAIN_IsIAFieldDPrintFormatSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldDPrintFormatSupported';
function DTWAIN_IsIAFieldDValueSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldDValueSupported';
function DTWAIN_IsIAFieldELastPageSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldELastPageSupported';
function DTWAIN_IsIAFieldELevelSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldELevelSupported';
function DTWAIN_IsIAFieldEPrintFormatSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldEPrintFormatSupported';
function DTWAIN_IsIAFieldEValueSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIAFieldEValueSupported';
function DTWAIN_IsImageAddressingSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsImageAddressingSupported';
function DTWAIN_IsIndicatorEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIndicatorEnabled';
function DTWAIN_IsIndicatorSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsIndicatorSupported';
function DTWAIN_IsInitialized : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsInitialized';
function DTWAIN_IsJobControlSupported(Source:DTWAIN_SOURCE; JobControl:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsJobControlSupported';
function DTWAIN_IsLampEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsLampEnabled';
function DTWAIN_IsLampSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsLampSupported';
function DTWAIN_IsLightPathSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsLightPathSupported';
function DTWAIN_IsLightSourceSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsLightSourceSupported';
function DTWAIN_IsMaxBuffersSupported(Source:DTWAIN_SOURCE; MaxBuf:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsMaxBuffersSupported';
function DTWAIN_IsMemFileXferSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsMemFileXferSupported';
function DTWAIN_IsMsgNotifyEnabled : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsMsgNotifyEnabled';
function DTWAIN_IsNotifyTripletsEnabled : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsNotifyTripletsEnabled';
function DTWAIN_IsOCREngineActivated(OCREngine:DTWAIN_OCRENGINE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsOCREngineActivated';
function DTWAIN_IsOpenSourcesOnSelect : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsOpenSourcesOnSelect';
function DTWAIN_IsOrientationSupported(Source:DTWAIN_SOURCE; Orientation:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsOrientationSupported';
function DTWAIN_IsOverscanSupported(Source:DTWAIN_SOURCE; SupportValue:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsOverscanSupported';
function DTWAIN_IsPaperDetectable(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsPaperDetectable';
function DTWAIN_IsPaperSizeSupported(Source:DTWAIN_SOURCE; PaperSize:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsPaperSizeSupported';
function DTWAIN_IsPatchcodeCapsSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsPatchcodeCapsSupported';
function DTWAIN_IsPatchcodeDetectionEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsPatchcodeDetectionEnabled';
function DTWAIN_IsPatchcodeSupported(Source:DTWAIN_SOURCE; PatchCode:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsPatchcodeSupported';
function DTWAIN_IsPeekMessageLoopEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsPeekMessageLoopEnabled';
function DTWAIN_IsPixelTypeSupported(Source:DTWAIN_SOURCE; PixelType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsPixelTypeSupported';
function DTWAIN_IsPrinterEnabled(Source:DTWAIN_SOURCE; Printer:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsPrinterEnabled';
function DTWAIN_IsPrinterSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsPrinterSupported';
function DTWAIN_IsRotationSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsRotationSupported';
function DTWAIN_IsSessionEnabled : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsSessionEnabled';
function DTWAIN_IsSkipImageInfoError(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsSkipImageInfoError';
function DTWAIN_IsSourceAcquiring(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsSourceAcquiring';
function DTWAIN_IsSourceAcquiringEx(Source:DTWAIN_SOURCE; bUIOnly:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsSourceAcquiringEx';
function DTWAIN_IsSourceInUIOnlyMode(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsSourceInUIOnlyMode';
function DTWAIN_IsSourceOpen(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsSourceOpen';
function DTWAIN_IsSourceSelected(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsSourceSelected';
function DTWAIN_IsSourceValid(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsSourceValid';
function DTWAIN_IsThumbnailEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsThumbnailEnabled';
function DTWAIN_IsThumbnailSupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsThumbnailSupported';
function DTWAIN_IsTwainAvailable : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsTwainAvailable';
function DTWAIN_IsTwainAvailableEx(directories:LPTSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsTwainAvailableEx';
function DTWAIN_IsTwainAvailableExA(directories:LPSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsTwainAvailableExA';
function DTWAIN_IsTwainAvailableExW(directories:LPWSTR; nMaxLen:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsTwainAvailableExW';
function DTWAIN_IsTwainMsg : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsTwainMsg';
function DTWAIN_IsUIControllable(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsUIControllable';
function DTWAIN_IsUIEnabled(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsUIEnabled';
function DTWAIN_IsUIOnlySupported(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_IsUIOnlySupported';
function DTWAIN_LoadCustomStringResources(sLangDLL:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LoadCustomStringResources';
function DTWAIN_LoadCustomStringResourcesA(sLangDLL:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LoadCustomStringResourcesA';
function DTWAIN_LoadCustomStringResourcesEx(sLangDLL:LPCTSTR; bClear:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LoadCustomStringResourcesEx';
function DTWAIN_LoadCustomStringResourcesExA(sLangDLL:LPCSTR; bClear:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LoadCustomStringResourcesExA';
function DTWAIN_LoadCustomStringResourcesExW(sLangDLL:LPCWSTR; bClear:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LoadCustomStringResourcesExW';
function DTWAIN_LoadCustomStringResourcesW(sLangDLL:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LoadCustomStringResourcesW';
function DTWAIN_LoadLanguageResource(nLanguage:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LoadLanguageResource';
function DTWAIN_LockMemory(h:NativeInt) : DTWAIN_MEMORY_PTR; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LockMemory';
function DTWAIN_LockMemoryEx(h:NativeInt) : DTWAIN_MEMORY_PTR; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LockMemoryEx';
function DTWAIN_LogMessage(message:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LogMessage';
function DTWAIN_LogMessageA(message:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LogMessageA';
function DTWAIN_LogMessageW(message:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_LogMessageW';
function DTWAIN_MakeRGB(red:LONG; green:LONG; blue:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_MakeRGB';
function DTWAIN_OpenSource(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_OpenSource';
function DTWAIN_OpenSourcesOnSelect(bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_OpenSourcesOnSelect';
function DTWAIN_RangeCreate(nEnumType:LONG) : DTWAIN_RANGE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeCreate';
function DTWAIN_RangeCreateFromCap(Source:DTWAIN_SOURCE; lCapType:LONG) : DTWAIN_RANGE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeCreateFromCap';
function DTWAIN_RangeDestroy(pSource:DTWAIN_RANGE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeDestroy';
function DTWAIN_RangeExpand(pSource:DTWAIN_RANGE; pArray:LPDTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeExpand';
function DTWAIN_RangeExpandEx(Range:DTWAIN_RANGE) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeExpandEx';
function DTWAIN_RangeGetAll(pArray:DTWAIN_RANGE; pVariantLow:LPVOID; pVariantUp:LPVOID; pVariantStep:LPVOID; pVariantDefault:LPVOID; pVariantCurrent:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetAll';
function DTWAIN_RangeGetAllFloat(pArray:DTWAIN_RANGE; pVariantLow:LPDTWAIN_FLOAT; pVariantUp:LPDTWAIN_FLOAT; pVariantStep:LPDTWAIN_FLOAT; pVariantDefault:LPDTWAIN_FLOAT; pVariantCurrent:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetAllFloat';
function DTWAIN_RangeGetAllFloatString(pArray:DTWAIN_RANGE; dLow:LPTSTR; dUp:LPTSTR; dStep:LPTSTR; dDefault:LPTSTR; dCurrent:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetAllFloatString';
function DTWAIN_RangeGetAllFloatStringA(pArray:DTWAIN_RANGE; dLow:LPSTR; dUp:LPSTR; dStep:LPSTR; dDefault:LPSTR; dCurrent:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetAllFloatStringA';
function DTWAIN_RangeGetAllFloatStringW(pArray:DTWAIN_RANGE; dLow:LPWSTR; dUp:LPWSTR; dStep:LPWSTR; dDefault:LPWSTR; dCurrent:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetAllFloatStringW';
function DTWAIN_RangeGetAllLong(pArray:DTWAIN_RANGE; pVariantLow:LPLONG; pVariantUp:LPLONG; pVariantStep:LPLONG; pVariantDefault:LPLONG; pVariantCurrent:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetAllLong';
function DTWAIN_RangeGetCount(pArray:DTWAIN_RANGE) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetCount';
function DTWAIN_RangeGetExpValue(pArray:DTWAIN_RANGE; lPos:LONG; pVariant:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetExpValue';
function DTWAIN_RangeGetExpValueFloat(pArray:DTWAIN_RANGE; lPos:LONG; pVal:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetExpValueFloat';
function DTWAIN_RangeGetExpValueFloatString(pArray:DTWAIN_RANGE; lPos:LONG; pVal:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetExpValueFloatString';
function DTWAIN_RangeGetExpValueFloatStringA(pArray:DTWAIN_RANGE; lPos:LONG; pVal:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetExpValueFloatStringA';
function DTWAIN_RangeGetExpValueFloatStringW(pArray:DTWAIN_RANGE; lPos:LONG; pVal:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetExpValueFloatStringW';
function DTWAIN_RangeGetExpValueLong(pArray:DTWAIN_RANGE; lPos:LONG; pVal:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetExpValueLong';
function DTWAIN_RangeGetNearestValue(pArray:DTWAIN_RANGE; pVariantIn:LPVOID; pVariantOut:LPVOID; RoundType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetNearestValue';
function DTWAIN_RangeGetNearestValueFloat(pArray:DTWAIN_RANGE; dIn:DTWAIN_FLOAT; pOut:LPDTWAIN_FLOAT; RoundType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetNearestValueFloat';
function DTWAIN_RangeGetNearestValueFloatString(pArray:DTWAIN_RANGE; dIn:LPCTSTR; pOut:LPTSTR; RoundType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetNearestValueFloatString';
function DTWAIN_RangeGetNearestValueFloatStringA(pArray:DTWAIN_RANGE; dIn:LPCSTR; dOut:LPSTR; RoundType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetNearestValueFloatStringA';
function DTWAIN_RangeGetNearestValueFloatStringW(pArray:DTWAIN_RANGE; dIn:LPCWSTR; dOut:LPWSTR; RoundType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetNearestValueFloatStringW';
function DTWAIN_RangeGetNearestValueLong(pArray:DTWAIN_RANGE; lIn:LONG; pOut:LPLONG; RoundType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetNearestValueLong';
function DTWAIN_RangeGetPos(pArray:DTWAIN_RANGE; pVariant:LPVOID; pPos:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetPos';
function DTWAIN_RangeGetPosFloat(pArray:DTWAIN_RANGE; Val:DTWAIN_FLOAT; pPos:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetPosFloat';
function DTWAIN_RangeGetPosFloatString(pArray:DTWAIN_RANGE; Val:LPCTSTR; pPos:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetPosFloatString';
function DTWAIN_RangeGetPosFloatStringA(pArray:DTWAIN_RANGE; Val:LPCSTR; pPos:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetPosFloatStringA';
function DTWAIN_RangeGetPosFloatStringW(pArray:DTWAIN_RANGE; Val:LPCWSTR; pPos:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetPosFloatStringW';
function DTWAIN_RangeGetPosLong(pArray:DTWAIN_RANGE; Value:LONG; pPos:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetPosLong';
function DTWAIN_RangeGetValue(pArray:DTWAIN_RANGE; nWhich:LONG; pVariant:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetValue';
function DTWAIN_RangeGetValueFloat(pArray:DTWAIN_RANGE; nWhich:LONG; pVal:LPDTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetValueFloat';
function DTWAIN_RangeGetValueFloatString(pArray:DTWAIN_RANGE; nWhich:LONG; pVal:LPTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetValueFloatString';
function DTWAIN_RangeGetValueFloatStringA(pArray:DTWAIN_RANGE; nWhich:LONG; dValue:LPSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetValueFloatStringA';
function DTWAIN_RangeGetValueFloatStringW(pArray:DTWAIN_RANGE; nWhich:LONG; dValue:LPWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetValueFloatStringW';
function DTWAIN_RangeGetValueLong(pArray:DTWAIN_RANGE; nWhich:LONG; pVal:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeGetValueLong';
function DTWAIN_RangeIsValid(Range:DTWAIN_RANGE; pStatus:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeIsValid';
function DTWAIN_RangeSetAll(pArray:DTWAIN_RANGE; pVariantLow:LPVOID; pVariantUp:LPVOID; pVariantStep:LPVOID; pVariantDefault:LPVOID; pVariantCurrent:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetAll';
function DTWAIN_RangeSetAllFloat(pArray:DTWAIN_RANGE; dLow:DTWAIN_FLOAT; dUp:DTWAIN_FLOAT; dStep:DTWAIN_FLOAT; dDefault:DTWAIN_FLOAT; dCurrent:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetAllFloat';
function DTWAIN_RangeSetAllFloatString(pArray:DTWAIN_RANGE; dLow:LPCTSTR; dUp:LPCTSTR; dStep:LPCTSTR; dDefault:LPCTSTR; dCurrent:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetAllFloatString';
function DTWAIN_RangeSetAllFloatStringA(pArray:DTWAIN_RANGE; dLow:LPCSTR; dUp:LPCSTR; dStep:LPCSTR; dDefault:LPCSTR; dCurrent:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetAllFloatStringA';
function DTWAIN_RangeSetAllFloatStringW(pArray:DTWAIN_RANGE; dLow:LPCWSTR; dUp:LPCWSTR; dStep:LPCWSTR; dDefault:LPCWSTR; dCurrent:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetAllFloatStringW';
function DTWAIN_RangeSetAllLong(pArray:DTWAIN_RANGE; lLow:LONG; lUp:LONG; lStep:LONG; lDefault:LONG; lCurrent:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetAllLong';
function DTWAIN_RangeSetValue(pArray:DTWAIN_RANGE; nWhich:LONG; pVal:LPVOID) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetValue';
function DTWAIN_RangeSetValueFloat(pArray:DTWAIN_RANGE; nWhich:LONG; Val:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetValueFloat';
function DTWAIN_RangeSetValueFloatString(pArray:DTWAIN_RANGE; nWhich:LONG; Val:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetValueFloatString';
function DTWAIN_RangeSetValueFloatStringA(pArray:DTWAIN_RANGE; nWhich:LONG; dValue:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetValueFloatStringA';
function DTWAIN_RangeSetValueFloatStringW(pArray:DTWAIN_RANGE; nWhich:LONG; dValue:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetValueFloatStringW';
function DTWAIN_RangeSetValueLong(pArray:DTWAIN_RANGE; nWhich:LONG; Val:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RangeSetValueLong';
function DTWAIN_RemovePDFTextElement(Source:DTWAIN_SOURCE; TextElement:DTWAIN_PDFTEXTELEMENT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RemovePDFTextElement';
function DTWAIN_ResetPDFTextElement(TextElement:DTWAIN_PDFTEXTELEMENT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ResetPDFTextElement';
function DTWAIN_RewindPage(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RewindPage';
function DTWAIN_RotateImage(hDib:NativeInt; rotationAngle:DTWAIN_FLOAT) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RotateImage';
function DTWAIN_RotateImageString(hDib:NativeInt; rotationAngle:LPCTSTR) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RotateImageString';
function DTWAIN_RotateImageStringA(hDib:NativeInt; rotationAngle:LPCSTR) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RotateImageStringA';
function DTWAIN_RotateImageStringW(hDib:NativeInt; rotationAngle:LPCWSTR) : NativeInt; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_RotateImageStringW';
function DTWAIN_SelectDefaultOCREngine : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectDefaultOCREngine';
function DTWAIN_SelectDefaultSource : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectDefaultSource';
function DTWAIN_SelectDefaultSourceWithOpen(bOpen:BOOL) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectDefaultSourceWithOpen';
function DTWAIN_SelectOCREngine : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngine';
function DTWAIN_SelectOCREngine2(hWndParent:NativeInt; szTitle:LPCTSTR; xPos:LONG; yPos:LONG; nOptions:LONG) : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngine2';
function DTWAIN_SelectOCREngine2A(hWndParent:NativeInt; szTitle:LPCSTR; xPos:LONG; yPos:LONG; nOptions:LONG) : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngine2A';
function DTWAIN_SelectOCREngine2Ex(hWndParent:NativeInt; szTitle:LPCTSTR; xPos:LONG; yPos:LONG; szIncludeFilter:LPCTSTR; szExcludeFilter:LPCTSTR; szNameMapping:LPCTSTR; nOptions:LONG) : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngine2Ex';
function DTWAIN_SelectOCREngine2ExA(hWndParent:NativeInt; szTitle:LPCSTR; xPos:LONG; yPos:LONG; szIncludeNames:LPCSTR; szExcludeNames:LPCSTR; szNameMapping:LPCSTR; nOptions:LONG) : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngine2ExA';
function DTWAIN_SelectOCREngine2ExW(hWndParent:NativeInt; szTitle:LPCWSTR; xPos:LONG; yPos:LONG; szIncludeNames:LPCWSTR; szExcludeNames:LPCWSTR; szNameMapping:LPCWSTR; nOptions:LONG) : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngine2ExW';
function DTWAIN_SelectOCREngine2W(hWndParent:NativeInt; szTitle:LPCWSTR; xPos:LONG; yPos:LONG; nOptions:LONG) : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngine2W';
function DTWAIN_SelectOCREngineByName(lpszName:LPCTSTR) : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngineByName';
function DTWAIN_SelectOCREngineByNameA(lpszName:LPCSTR) : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngineByNameA';
function DTWAIN_SelectOCREngineByNameW(lpszName:LPCWSTR) : DTWAIN_OCRENGINE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectOCREngineByNameW';
function DTWAIN_SelectSource : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSource';
function DTWAIN_SelectSource2(hWndParent:NativeInt; szTitle:LPCTSTR; xPos:LONG; yPos:LONG; nOptions:LONG) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSource2';
function DTWAIN_SelectSource2A(hWndParent:NativeInt; szTitle:LPCSTR; xPos:LONG; yPos:LONG; nOptions:LONG) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSource2A';
function DTWAIN_SelectSource2Ex(hWndParent:NativeInt; szTitle:LPCTSTR; xPos:LONG; yPos:LONG; szIncludeFilter:LPCTSTR; szExcludeFilter:LPCTSTR; szNameMapping:LPCTSTR; nOptions:LONG) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSource2Ex';
function DTWAIN_SelectSource2ExA(hWndParent:NativeInt; szTitle:LPCSTR; xPos:LONG; yPos:LONG; szIncludeNames:LPCSTR; szExcludeNames:LPCSTR; szNameMapping:LPCSTR; nOptions:LONG) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSource2ExA';
function DTWAIN_SelectSource2ExW(hWndParent:NativeInt; szTitle:LPCWSTR; xPos:LONG; yPos:LONG; szIncludeNames:LPCWSTR; szExcludeNames:LPCWSTR; szNameMapping:LPCWSTR; nOptions:LONG) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSource2ExW';
function DTWAIN_SelectSource2W(hWndParent:NativeInt; szTitle:LPCWSTR; xPos:LONG; yPos:LONG; nOptions:LONG) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSource2W';
function DTWAIN_SelectSourceByName(lpszName:LPCTSTR) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSourceByName';
function DTWAIN_SelectSourceByNameA(lpszName:LPCSTR) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSourceByNameA';
function DTWAIN_SelectSourceByNameW(lpszName:LPCWSTR) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSourceByNameW';
function DTWAIN_SelectSourceByNameWithOpen(lpszName:LPCTSTR; bOpen:BOOL) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSourceByNameWithOpen';
function DTWAIN_SelectSourceByNameWithOpenA(lpszName:LPCSTR; bOpen:BOOL) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSourceByNameWithOpenA';
function DTWAIN_SelectSourceByNameWithOpenW(lpszName:LPCWSTR; bOpen:BOOL) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSourceByNameWithOpenW';
function DTWAIN_SelectSourceWithOpen(bOpen:BOOL) : DTWAIN_SOURCE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SelectSourceWithOpen';
function DTWAIN_SetAcquireArea(Source:DTWAIN_SOURCE; lSetType:LONG; FloatEnum:DTWAIN_ARRAY; ActualEnum:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireArea';
function DTWAIN_SetAcquireArea2(Source:DTWAIN_SOURCE; left:DTWAIN_FLOAT; top:DTWAIN_FLOAT; right:DTWAIN_FLOAT; bottom:DTWAIN_FLOAT; lUnit:LONG; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireArea2';
function DTWAIN_SetAcquireArea2String(Source:DTWAIN_SOURCE; left:LPCTSTR; top:LPCTSTR; right:LPCTSTR; bottom:LPCTSTR; lUnit:LONG; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireArea2String';
function DTWAIN_SetAcquireArea2StringA(Source:DTWAIN_SOURCE; left:LPCSTR; top:LPCSTR; right:LPCSTR; bottom:LPCSTR; lUnit:LONG; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireArea2StringA';
function DTWAIN_SetAcquireArea2StringW(Source:DTWAIN_SOURCE; left:LPCWSTR; top:LPCWSTR; right:LPCWSTR; bottom:LPCWSTR; lUnit:LONG; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireArea2StringW';
function DTWAIN_SetAcquireImageNegative(Source:DTWAIN_SOURCE; IsNegative:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireImageNegative';
function DTWAIN_SetAcquireImageScale(Source:DTWAIN_SOURCE; xscale:DTWAIN_FLOAT; yscale:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireImageScale';
function DTWAIN_SetAcquireImageScaleString(Source:DTWAIN_SOURCE; xscale:LPCTSTR; yscale:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireImageScaleString';
function DTWAIN_SetAcquireImageScaleStringA(Source:DTWAIN_SOURCE; xscale:LPCSTR; yscale:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireImageScaleStringA';
function DTWAIN_SetAcquireImageScaleStringW(Source:DTWAIN_SOURCE; xscale:LPCWSTR; yscale:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireImageScaleStringW';
function DTWAIN_SetAcquireStripBuffer(Source:DTWAIN_SOURCE; hMem:NativeInt) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireStripBuffer';
function DTWAIN_SetAcquireStripSize(Source:DTWAIN_SOURCE; StripSize:DWORD) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAcquireStripSize';
function DTWAIN_SetAlarmVolume(Source:DTWAIN_SOURCE; Volume:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAlarmVolume';
function DTWAIN_SetAlarms(Source:DTWAIN_SOURCE; Alarms:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAlarms';
function DTWAIN_SetAllCapsToDefault(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAllCapsToDefault';
function DTWAIN_SetAppInfo(szVerStr:LPCTSTR; szManu:LPCTSTR; szProdFam:LPCTSTR; szProdName:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAppInfo';
function DTWAIN_SetAppInfoA(szVerStr:LPCSTR; szManu:LPCSTR; szProdFam:LPCSTR; szProdName:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAppInfoA';
function DTWAIN_SetAppInfoW(szVerStr:LPCWSTR; szManu:LPCWSTR; szProdFam:LPCWSTR; szProdName:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAppInfoW';
function DTWAIN_SetAuthor(Source:DTWAIN_SOURCE; szAuthor:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAuthor';
function DTWAIN_SetAuthorA(Source:DTWAIN_SOURCE; szAuthor:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAuthorA';
function DTWAIN_SetAuthorW(Source:DTWAIN_SOURCE; szAuthor:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAuthorW';
function DTWAIN_SetAvailablePrinters(Source:DTWAIN_SOURCE; lpAvailPrinters:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAvailablePrinters';
function DTWAIN_SetAvailablePrintersArray(Source:DTWAIN_SOURCE; AvailPrinters:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetAvailablePrintersArray';
function DTWAIN_SetBarcodeMaxPriorities(Source:DTWAIN_SOURCE; nMaxSearchRetries:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBarcodeMaxPriorities';
function DTWAIN_SetBarcodeMaxRetries(Source:DTWAIN_SOURCE; nMaxRetries:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBarcodeMaxRetries';
function DTWAIN_SetBarcodePriorities(Source:DTWAIN_SOURCE; SearchPriorities:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBarcodePriorities';
function DTWAIN_SetBarcodeSearchMode(Source:DTWAIN_SOURCE; nSearchMode:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBarcodeSearchMode';
function DTWAIN_SetBarcodeTimeOut(Source:DTWAIN_SOURCE; TimeOutValue:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBarcodeTimeOut';
function DTWAIN_SetBitDepth(Source:DTWAIN_SOURCE; BitDepth:LONG; bSetCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBitDepth';
function DTWAIN_SetBlankPageDetection(Source:DTWAIN_SOURCE; threshold:DTWAIN_FLOAT; discard_option:LONG; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBlankPageDetection';
function DTWAIN_SetBlankPageDetectionEx(Source:DTWAIN_SOURCE; threshold:DTWAIN_FLOAT; autodetect:LONG; detectOpts:LONG; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBlankPageDetectionEx';
function DTWAIN_SetBlankPageDetectionExString(Source:DTWAIN_SOURCE; threshold:LPCTSTR; autodetect_option:LONG; detectOpts:LONG; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBlankPageDetectionExString';
function DTWAIN_SetBlankPageDetectionExStringA(Source:DTWAIN_SOURCE; threshold:LPCSTR; autodetect_option:LONG; detectOpts:LONG; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBlankPageDetectionExStringA';
function DTWAIN_SetBlankPageDetectionExStringW(Source:DTWAIN_SOURCE; threshold:LPCWSTR; autodetect_option:LONG; detectOpts:LONG; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBlankPageDetectionExStringW';
function DTWAIN_SetBlankPageDetectionString(Source:DTWAIN_SOURCE; threshold:LPCTSTR; autodetect_option:LONG; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBlankPageDetectionString';
function DTWAIN_SetBlankPageDetectionStringA(Source:DTWAIN_SOURCE; threshold:LPCSTR; autodetect_option:LONG; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBlankPageDetectionStringA';
function DTWAIN_SetBlankPageDetectionStringW(Source:DTWAIN_SOURCE; threshold:LPCWSTR; autodetect_option:LONG; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBlankPageDetectionStringW';
function DTWAIN_SetBrightness(Source:DTWAIN_SOURCE; Brightness:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBrightness';
function DTWAIN_SetBrightnessString(Source:DTWAIN_SOURCE; Brightness:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBrightnessString';
function DTWAIN_SetBrightnessStringA(Source:DTWAIN_SOURCE; Contrast:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBrightnessStringA';
function DTWAIN_SetBrightnessStringW(Source:DTWAIN_SOURCE; Contrast:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBrightnessStringW';
function DTWAIN_SetBufferedTileMode(Source:DTWAIN_SOURCE; bTileMode:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetBufferedTileMode';
function DTWAIN_SetCallback(Fn:DTwainCallback; UserData:LONG) : DTwainCallback; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCallback';
function DTWAIN_SetCallback64(Fn:DTwainCallback64; UserData:Int64) : DTwainCallback64; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCallback64';
function DTWAIN_SetCamera(Source:DTWAIN_SOURCE; szCamera:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCamera';
function DTWAIN_SetCameraA(Source:DTWAIN_SOURCE; szCamera:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCameraA';
function DTWAIN_SetCameraW(Source:DTWAIN_SOURCE; szCamera:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCameraW';
function DTWAIN_SetCapValues(Source:DTWAIN_SOURCE; lCap:LONG; lSetType:LONG; pArray:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCapValues';
function DTWAIN_SetCapValuesEx(Source:DTWAIN_SOURCE; lCap:LONG; lSetType:LONG; lContainerType:LONG; pArray:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCapValuesEx';
function DTWAIN_SetCapValuesEx2(Source:DTWAIN_SOURCE; lCap:LONG; lSetType:LONG; lContainerType:LONG; nDataType:LONG; pArray:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCapValuesEx2';
function DTWAIN_SetCaption(Source:DTWAIN_SOURCE; Caption:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCaption';
function DTWAIN_SetCaptionA(Source:DTWAIN_SOURCE; Caption:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCaptionA';
function DTWAIN_SetCaptionW(Source:DTWAIN_SOURCE; Caption:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCaptionW';
function DTWAIN_SetCompressionType(Source:DTWAIN_SOURCE; lCompression:LONG; bSetCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCompressionType';
function DTWAIN_SetContrast(Source:DTWAIN_SOURCE; Contrast:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetContrast';
function DTWAIN_SetContrastString(Source:DTWAIN_SOURCE; Contrast:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetContrastString';
function DTWAIN_SetContrastStringA(Source:DTWAIN_SOURCE; Contrast:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetContrastStringA';
function DTWAIN_SetContrastStringW(Source:DTWAIN_SOURCE; Contrast:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetContrastStringW';
function DTWAIN_SetCountry(nCountry:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCountry';
function DTWAIN_SetCurrentRetryCount(Source:DTWAIN_SOURCE; nCount:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCurrentRetryCount';
function DTWAIN_SetCustomDSData(Source:DTWAIN_SOURCE; hData:NativeInt; Data:PByte; dSize:DWORD; nFlags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetCustomDSData';
function DTWAIN_SetDSMSearchOrder(SearchPath:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDSMSearchOrder';
function DTWAIN_SetDSMSearchOrderEx(SearchOrder:LPCTSTR; UserPath:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDSMSearchOrderEx';
function DTWAIN_SetDSMSearchOrderExA(SearchOrder:LPCSTR; szUserPath:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDSMSearchOrderExA';
function DTWAIN_SetDSMSearchOrderExW(SearchOrder:LPCWSTR; szUserPath:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDSMSearchOrderExW';
function DTWAIN_SetDefaultSource(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDefaultSource';
function DTWAIN_SetDeviceNotifications(Source:DTWAIN_SOURCE; DevEvents:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDeviceNotifications';
function DTWAIN_SetDeviceTimeDate(Source:DTWAIN_SOURCE; szTimeDate:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDeviceTimeDate';
function DTWAIN_SetDeviceTimeDateA(Source:DTWAIN_SOURCE; szTimeDate:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDeviceTimeDateA';
function DTWAIN_SetDeviceTimeDateW(Source:DTWAIN_SOURCE; szTimeDate:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDeviceTimeDateW';
function DTWAIN_SetDoubleFeedDetectLength(Source:DTWAIN_SOURCE; Value:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDoubleFeedDetectLength';
function DTWAIN_SetDoubleFeedDetectLengthString(Source:DTWAIN_SOURCE; value:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDoubleFeedDetectLengthString';
function DTWAIN_SetDoubleFeedDetectLengthStringA(Source:DTWAIN_SOURCE; szLength:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDoubleFeedDetectLengthStringA';
function DTWAIN_SetDoubleFeedDetectLengthStringW(Source:DTWAIN_SOURCE; szLength:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDoubleFeedDetectLengthStringW';
function DTWAIN_SetDoubleFeedDetectValues(Source:DTWAIN_SOURCE; prray:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDoubleFeedDetectValues';
function DTWAIN_SetDoublePageCountOnDuplex(Source:DTWAIN_SOURCE; bDoubleCount:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetDoublePageCountOnDuplex';
function DTWAIN_SetEOJDetectValue(Source:DTWAIN_SOURCE; nValue:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetEOJDetectValue';
function DTWAIN_SetErrorBufferThreshold(nErrors:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetErrorBufferThreshold';
function DTWAIN_SetErrorCallback(proc:DTwainErrorProc; UserData:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetErrorCallback';
function DTWAIN_SetErrorCallback64(proc:DTwainErrorProc64; UserData64:Int64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetErrorCallback64';
function DTWAIN_SetFeederAlignment(Source:DTWAIN_SOURCE; lpAlignment:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetFeederAlignment';
function DTWAIN_SetFeederOrder(Source:DTWAIN_SOURCE; lOrder:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetFeederOrder';
function DTWAIN_SetFeederWaitTime(Source:DTWAIN_SOURCE; waitTime:LONG; flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetFeederWaitTime';
function DTWAIN_SetFileAutoIncrement(Source:DTWAIN_SOURCE; Increment:LONG; bResetOnAcquire:BOOL; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetFileAutoIncrement';
function DTWAIN_SetFileCompressionType(Source:DTWAIN_SOURCE; lCompression:LONG; bIsCustom:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetFileCompressionType';
function DTWAIN_SetFileSavePos(hWndParent:NativeInt; szTitle:LPCTSTR; xPos:LONG; yPos:LONG; nFlags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetFileSavePos';
function DTWAIN_SetFileSavePosA(hWndParent:NativeInt; szTitle:LPCSTR; xPos:LONG; yPos:LONG; nFlags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetFileSavePosA';
function DTWAIN_SetFileSavePosW(hWndParent:NativeInt; szTitle:LPCWSTR; xPos:LONG; yPos:LONG; nFlags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetFileSavePosW';
function DTWAIN_SetFileXferFormat(Source:DTWAIN_SOURCE; lFileType:LONG; bSetCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetFileXferFormat';
function DTWAIN_SetHalftone(Source:DTWAIN_SOURCE; lpHalftone:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetHalftone';
function DTWAIN_SetHalftoneA(Source:DTWAIN_SOURCE; lpHalftone:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetHalftoneA';
function DTWAIN_SetHalftoneW(Source:DTWAIN_SOURCE; lpHalftone:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetHalftoneW';
function DTWAIN_SetHighlight(Source:DTWAIN_SOURCE; Highlight:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetHighlight';
function DTWAIN_SetHighlightString(Source:DTWAIN_SOURCE; Highlight:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetHighlightString';
function DTWAIN_SetHighlightStringA(Source:DTWAIN_SOURCE; Highlight:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetHighlightStringA';
function DTWAIN_SetHighlightStringW(Source:DTWAIN_SOURCE; Highlight:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetHighlightStringW';
function DTWAIN_SetJobControl(Source:DTWAIN_SOURCE; JobControl:LONG; bSetCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetJobControl';
function DTWAIN_SetJpegValues(Source:DTWAIN_SOURCE; Quality:LONG; Progressive:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetJpegValues';
function DTWAIN_SetJpegXRValues(Source:DTWAIN_SOURCE; Quality:LONG; Progressive:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetJpegXRValues';
function DTWAIN_SetLanguage(nLanguage:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLanguage';
function DTWAIN_SetLastError(nError:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLastError';
function DTWAIN_SetLightPath(Source:DTWAIN_SOURCE; LightPath:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLightPath';
function DTWAIN_SetLightPathEx(Source:DTWAIN_SOURCE; LightPaths:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLightPathEx';
function DTWAIN_SetLightSource(Source:DTWAIN_SOURCE; LightSource:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLightSource';
function DTWAIN_SetLightSources(Source:DTWAIN_SOURCE; LightSources:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLightSources';
function DTWAIN_SetLogSaveThreshold(lineCount:Int64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLogSaveThreshold';
function DTWAIN_SetLoggerCallback(logProc:DTwainLoggerProc; UserData:Int64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLoggerCallback';
function DTWAIN_SetLoggerCallbackA(logProc:DTwainLoggerProcA; UserData:Int64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLoggerCallbackA';
function DTWAIN_SetLoggerCallbackW(logProc:DTwainLoggerProcW; UserData:Int64) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetLoggerCallbackW';
function DTWAIN_SetManualDuplexMode(Source:DTWAIN_SOURCE; Flags:LONG; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetManualDuplexMode';
function DTWAIN_SetMaxAcquisitions(Source:DTWAIN_SOURCE; MaxAcquires:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetMaxAcquisitions';
function DTWAIN_SetMaxBuffers(Source:DTWAIN_SOURCE; MaxBuf:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetMaxBuffers';
function DTWAIN_SetMaxRetryAttempts(Source:DTWAIN_SOURCE; nAttempts:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetMaxRetryAttempts';
function DTWAIN_SetMultipageScanMode(Source:DTWAIN_SOURCE; ScanType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetMultipageScanMode';
function DTWAIN_SetNoiseFilter(Source:DTWAIN_SOURCE; NoiseFilter:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetNoiseFilter';
function DTWAIN_SetOCRCapValues(Engine:DTWAIN_OCRENGINE; OCRCapValue:LONG; SetType:LONG; CapValues:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetOCRCapValues';
function DTWAIN_SetOrientation(Source:DTWAIN_SOURCE; Orient:LONG; bSetCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetOrientation';
function DTWAIN_SetOverscan(Source:DTWAIN_SOURCE; Value:LONG; bSetCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetOverscan';
function DTWAIN_SetPDFAESEncryption(Source:DTWAIN_SOURCE; nWhichEncryption:LONG; bUseAES:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFAESEncryption';
function DTWAIN_SetPDFASCIICompression(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFASCIICompression';
function DTWAIN_SetPDFAuthor(Source:DTWAIN_SOURCE; lpAuthor:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFAuthor';
function DTWAIN_SetPDFAuthorA(Source:DTWAIN_SOURCE; lpAuthor:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFAuthorA';
function DTWAIN_SetPDFAuthorW(Source:DTWAIN_SOURCE; lpAuthor:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFAuthorW';
function DTWAIN_SetPDFCompression(Source:DTWAIN_SOURCE; bCompression:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFCompression';
function DTWAIN_SetPDFCreator(Source:DTWAIN_SOURCE; lpCreator:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFCreator';
function DTWAIN_SetPDFCreatorA(Source:DTWAIN_SOURCE; lpCreator:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFCreatorA';
function DTWAIN_SetPDFCreatorW(Source:DTWAIN_SOURCE; lpCreator:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFCreatorW';
function DTWAIN_SetPDFEncryption(Source:DTWAIN_SOURCE; bUseEncryption:BOOL; lpszUser:LPCTSTR; lpszOwner:LPCTSTR; Permissions:DWORD; UseStrongEncryption:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFEncryption';
function DTWAIN_SetPDFEncryptionA(Source:DTWAIN_SOURCE; bUseEncryption:BOOL; lpszUser:LPCSTR; lpszOwner:LPCSTR; Permissions:DWORD; UseStrongEncryption:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFEncryptionA';
function DTWAIN_SetPDFEncryptionW(Source:DTWAIN_SOURCE; bUseEncryption:BOOL; lpszUser:LPCWSTR; lpszOwner:LPCWSTR; Permissions:DWORD; UseStrongEncryption:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFEncryptionW';
function DTWAIN_SetPDFJpegQuality(Source:DTWAIN_SOURCE; Quality:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFJpegQuality';
function DTWAIN_SetPDFKeywords(Source:DTWAIN_SOURCE; lpKeyWords:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFKeywords';
function DTWAIN_SetPDFKeywordsA(Source:DTWAIN_SOURCE; lpKeyWords:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFKeywordsA';
function DTWAIN_SetPDFKeywordsW(Source:DTWAIN_SOURCE; lpKeyWords:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFKeywordsW';
function DTWAIN_SetPDFOCRConversion(Engine:DTWAIN_OCRENGINE; PageType:LONG; FileType:LONG; PixelType:LONG; BitDepth:LONG; Options:LONG) : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFOCRConversion';
function DTWAIN_SetPDFOCRMode(Source:DTWAIN_SOURCE; bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFOCRMode';
function DTWAIN_SetPDFOrientation(Source:DTWAIN_SOURCE; lPOrientation:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFOrientation';
function DTWAIN_SetPDFPageScale(Source:DTWAIN_SOURCE; nOptions:LONG; xScale:DTWAIN_FLOAT; yScale:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFPageScale';
function DTWAIN_SetPDFPageScaleString(Source:DTWAIN_SOURCE; nOptions:LONG; xScale:LPCTSTR; yScale:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFPageScaleString';
function DTWAIN_SetPDFPageScaleStringA(Source:DTWAIN_SOURCE; nOptions:LONG; xScale:LPCSTR; yScale:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFPageScaleStringA';
function DTWAIN_SetPDFPageScaleStringW(Source:DTWAIN_SOURCE; nOptions:LONG; xScale:LPCWSTR; yScale:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFPageScaleStringW';
function DTWAIN_SetPDFPageSize(Source:DTWAIN_SOURCE; PageSize:LONG; CustomWidth:DTWAIN_FLOAT; CustomHeight:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFPageSize';
function DTWAIN_SetPDFPageSizeString(Source:DTWAIN_SOURCE; PageSize:LONG; CustomWidth:LPCTSTR; CustomHeight:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFPageSizeString';
function DTWAIN_SetPDFPageSizeStringA(Source:DTWAIN_SOURCE; PageSize:LONG; CustomWidth:LPCSTR; CustomHeight:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFPageSizeStringA';
function DTWAIN_SetPDFPageSizeStringW(Source:DTWAIN_SOURCE; PageSize:LONG; CustomWidth:LPCWSTR; CustomHeight:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFPageSizeStringW';
function DTWAIN_SetPDFPolarity(Source:DTWAIN_SOURCE; Polarity:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFPolarity';
function DTWAIN_SetPDFProducer(Source:DTWAIN_SOURCE; lpProducer:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFProducer';
function DTWAIN_SetPDFProducerA(Source:DTWAIN_SOURCE; lpProducer:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFProducerA';
function DTWAIN_SetPDFProducerW(Source:DTWAIN_SOURCE; lpProducer:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFProducerW';
function DTWAIN_SetPDFSubject(Source:DTWAIN_SOURCE; lpSubject:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFSubject';
function DTWAIN_SetPDFSubjectA(Source:DTWAIN_SOURCE; lpSubject:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFSubjectA';
function DTWAIN_SetPDFSubjectW(Source:DTWAIN_SOURCE; lpSubject:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFSubjectW';
function DTWAIN_SetPDFTextElementFloat(TextElement:DTWAIN_PDFTEXTELEMENT; val1:DTWAIN_FLOAT; val2:DTWAIN_FLOAT; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTextElementFloat';
function DTWAIN_SetPDFTextElementFloatString(TextElement:DTWAIN_PDFTEXTELEMENT; val1:LPCTSTR; val2:LPCTSTR; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTextElementFloatString';
function DTWAIN_SetPDFTextElementFloatStringA(TextElement:DTWAIN_PDFTEXTELEMENT; val1:LPCSTR; val2:LPCSTR; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTextElementFloatStringA';
function DTWAIN_SetPDFTextElementFloatStringW(TextElement:DTWAIN_PDFTEXTELEMENT; val1:LPCWSTR; val2:LPCWSTR; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTextElementFloatStringW';
function DTWAIN_SetPDFTextElementLong(TextElement:DTWAIN_PDFTEXTELEMENT; val1:LONG; val2:LONG; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTextElementLong';
function DTWAIN_SetPDFTextElementString(TextElement:DTWAIN_PDFTEXTELEMENT; val1:LPCTSTR; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTextElementString';
function DTWAIN_SetPDFTextElementStringA(TextElement:DTWAIN_PDFTEXTELEMENT; szString:LPCSTR; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTextElementStringA';
function DTWAIN_SetPDFTextElementStringW(TextElement:DTWAIN_PDFTEXTELEMENT; szString:LPCWSTR; Flags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTextElementStringW';
function DTWAIN_SetPDFTitle(Source:DTWAIN_SOURCE; lpTitle:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTitle';
function DTWAIN_SetPDFTitleA(Source:DTWAIN_SOURCE; lpTitle:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTitleA';
function DTWAIN_SetPDFTitleW(Source:DTWAIN_SOURCE; lpTitle:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPDFTitleW';
function DTWAIN_SetPaperSize(Source:DTWAIN_SOURCE; PaperSize:LONG; bSetCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPaperSize';
function DTWAIN_SetPatchcodeMaxPriorities(Source:DTWAIN_SOURCE; nMaxSearchRetries:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPatchcodeMaxPriorities';
function DTWAIN_SetPatchcodeMaxRetries(Source:DTWAIN_SOURCE; nMaxRetries:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPatchcodeMaxRetries';
function DTWAIN_SetPatchcodePriorities(Source:DTWAIN_SOURCE; SearchPriorities:DTWAIN_ARRAY) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPatchcodePriorities';
function DTWAIN_SetPatchcodeSearchMode(Source:DTWAIN_SOURCE; nSearchMode:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPatchcodeSearchMode';
function DTWAIN_SetPatchcodeTimeOut(Source:DTWAIN_SOURCE; TimeOutValue:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPatchcodeTimeOut';
function DTWAIN_SetPixelFlavor(Source:DTWAIN_SOURCE; PixelFlavor:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPixelFlavor';
function DTWAIN_SetPixelType(Source:DTWAIN_SOURCE; PixelType:LONG; BitDepth:LONG; bSetCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPixelType';
function DTWAIN_SetPostScriptTitle(Source:DTWAIN_SOURCE; szTitle:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPostScriptTitle';
function DTWAIN_SetPostScriptTitleA(Source:DTWAIN_SOURCE; szTitle:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPostScriptTitleA';
function DTWAIN_SetPostScriptTitleW(Source:DTWAIN_SOURCE; szTitle:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPostScriptTitleW';
function DTWAIN_SetPostScriptType(Source:DTWAIN_SOURCE; PSType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPostScriptType';
function DTWAIN_SetPrinter(Source:DTWAIN_SOURCE; Printer:LONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPrinter';
function DTWAIN_SetPrinterEx(Source:DTWAIN_SOURCE; Printer:LONG; bCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPrinterEx';
function DTWAIN_SetPrinterStartNumber(Source:DTWAIN_SOURCE; nStart:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPrinterStartNumber';
function DTWAIN_SetPrinterStringMode(Source:DTWAIN_SOURCE; PrinterMode:LONG; bSetCurrent:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPrinterStringMode';
function DTWAIN_SetPrinterStrings(Source:DTWAIN_SOURCE; ArrayString:DTWAIN_ARRAY; pNumStrings:LPLONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPrinterStrings';
function DTWAIN_SetPrinterSuffixString(Source:DTWAIN_SOURCE; Suffix:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPrinterSuffixString';
function DTWAIN_SetPrinterSuffixStringA(Source:DTWAIN_SOURCE; Suffix:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPrinterSuffixStringA';
function DTWAIN_SetPrinterSuffixStringW(Source:DTWAIN_SOURCE; Suffix:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetPrinterSuffixStringW';
function DTWAIN_SetQueryCapSupport(bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetQueryCapSupport';
function DTWAIN_SetResolution(Source:DTWAIN_SOURCE; Resolution:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetResolution';
function DTWAIN_SetResolutionString(Source:DTWAIN_SOURCE; Resolution:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetResolutionString';
function DTWAIN_SetResolutionStringA(Source:DTWAIN_SOURCE; Resolution:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetResolutionStringA';
function DTWAIN_SetResolutionStringW(Source:DTWAIN_SOURCE; Resolution:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetResolutionStringW';
function DTWAIN_SetResourcePath(ResourcePath:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetResourcePath';
function DTWAIN_SetResourcePathA(ResourcePath:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetResourcePathA';
function DTWAIN_SetResourcePathW(ResourcePath:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetResourcePathW';
function DTWAIN_SetRotation(Source:DTWAIN_SOURCE; Rotation:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetRotation';
function DTWAIN_SetRotationString(Source:DTWAIN_SOURCE; Rotation:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetRotationString';
function DTWAIN_SetRotationStringA(Source:DTWAIN_SOURCE; Rotation:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetRotationStringA';
function DTWAIN_SetRotationStringW(Source:DTWAIN_SOURCE; Rotation:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetRotationStringW';
function DTWAIN_SetSaveFileName(Source:DTWAIN_SOURCE; fName:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetSaveFileName';
function DTWAIN_SetSaveFileNameA(Source:DTWAIN_SOURCE; fName:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetSaveFileNameA';
function DTWAIN_SetSaveFileNameW(Source:DTWAIN_SOURCE; fName:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetSaveFileNameW';
function DTWAIN_SetShadow(Source:DTWAIN_SOURCE; Shadow:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetShadow';
function DTWAIN_SetShadowString(Source:DTWAIN_SOURCE; Shadow:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetShadowString';
function DTWAIN_SetShadowStringA(Source:DTWAIN_SOURCE; Shadow:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetShadowStringA';
function DTWAIN_SetShadowStringW(Source:DTWAIN_SOURCE; Shadow:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetShadowStringW';
function DTWAIN_SetSourceUnit(Source:DTWAIN_SOURCE; Unit_:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetSourceUnit';
function DTWAIN_SetTIFFCompressType(Source:DTWAIN_SOURCE; Setting:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTIFFCompressType';
function DTWAIN_SetTIFFInvert(Source:DTWAIN_SOURCE; Setting:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTIFFInvert';
function DTWAIN_SetTempFileDirectory(szFilePath:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTempFileDirectory';
function DTWAIN_SetTempFileDirectoryA(szFilePath:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTempFileDirectoryA';
function DTWAIN_SetTempFileDirectoryEx(szFilePath:LPCTSTR; CreationFlags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTempFileDirectoryEx';
function DTWAIN_SetTempFileDirectoryExA(szFilePath:LPCSTR; CreationFlags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTempFileDirectoryExA';
function DTWAIN_SetTempFileDirectoryExW(szFilePath:LPCWSTR; CreationFlags:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTempFileDirectoryExW';
function DTWAIN_SetTempFileDirectoryW(szFilePath:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTempFileDirectoryW';
function DTWAIN_SetThreshold(Source:DTWAIN_SOURCE; Threshold:DTWAIN_FLOAT; bSetBithDepthReduction:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetThreshold';
function DTWAIN_SetThresholdString(Source:DTWAIN_SOURCE; Threshold:LPCTSTR; bSetBitDepthReduction:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetThresholdString';
function DTWAIN_SetThresholdStringA(Source:DTWAIN_SOURCE; Threshold:LPCSTR; bSetBitDepthReduction:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetThresholdStringA';
function DTWAIN_SetThresholdStringW(Source:DTWAIN_SOURCE; Threshold:LPCWSTR; bSetBitDepthReduction:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetThresholdStringW';
function DTWAIN_SetTwainDSM(DSMType:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTwainDSM';
function DTWAIN_SetTwainDialogFont : LONG; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTwainDialogFont';
function DTWAIN_SetTwainLog(LogFlags:DWORD; lpszLogFile:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTwainLog';
function DTWAIN_SetTwainLogA(LogFlags:DWORD; lpszLogFile:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTwainLogA';
function DTWAIN_SetTwainLogW(LogFlags:DWORD; lpszLogFile:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTwainLogW';
function DTWAIN_SetTwainMode(lAcquireMode:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTwainMode';
function DTWAIN_SetTwainTimeout(milliseconds:LONG) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetTwainTimeout';
function DTWAIN_SetUpdateDibProc(DibProc:DTwainDIBUpdateProc) : DTwainDIBUpdateProc; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetUpdateDibProc';
function DTWAIN_SetXResolution(Source:DTWAIN_SOURCE; xResolution:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetXResolution';
function DTWAIN_SetXResolutionString(Source:DTWAIN_SOURCE; Resolution:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetXResolutionString';
function DTWAIN_SetXResolutionStringA(Source:DTWAIN_SOURCE; Resolution:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetXResolutionStringA';
function DTWAIN_SetXResolutionStringW(Source:DTWAIN_SOURCE; Resolution:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetXResolutionStringW';
function DTWAIN_SetYResolution(Source:DTWAIN_SOURCE; yResolution:DTWAIN_FLOAT) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetYResolution';
function DTWAIN_SetYResolutionString(Source:DTWAIN_SOURCE; Resolution:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetYResolutionString';
function DTWAIN_SetYResolutionStringA(Source:DTWAIN_SOURCE; Resolution:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetYResolutionStringA';
function DTWAIN_SetYResolutionStringW(Source:DTWAIN_SOURCE; Resolution:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SetYResolutionStringW';
function DTWAIN_ShowUIOnly(Source:DTWAIN_SOURCE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ShowUIOnly';
function DTWAIN_ShutdownOCREngine(OCREngine:DTWAIN_OCRENGINE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_ShutdownOCREngine';
function DTWAIN_SkipImageInfoError(Source:DTWAIN_SOURCE; bSkip:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SkipImageInfoError';
function DTWAIN_StartThread(DLLHandle:DTWAIN_HANDLE) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_StartThread';
function DTWAIN_StartTwainSession(hWndMsg:NativeInt; lpszDLLName:LPCTSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_StartTwainSession';
function DTWAIN_StartTwainSessionA(hWndMsg:NativeInt; lpszDLLName:LPCSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_StartTwainSessionA';
function DTWAIN_StartTwainSessionW(hWndMsg:NativeInt; lpszDLLName:LPCWSTR) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_StartTwainSessionW';
function DTWAIN_SysDestroy : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysDestroy';
function DTWAIN_SysInitialize : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitialize';
function DTWAIN_SysInitializeEx(szINIPath:LPCTSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeEx';
function DTWAIN_SysInitializeEx2(szINIPath:LPCTSTR; szImageDLLPath:LPCTSTR; szLangResourcePath:LPCTSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeEx2';
function DTWAIN_SysInitializeEx2A(szINIPath:LPCSTR; szImageDLLPath:LPCSTR; szLangResourcePath:LPCSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeEx2A';
function DTWAIN_SysInitializeEx2W(szINIPath:LPCWSTR; szImageDLLPath:LPCWSTR; szLangResourcePath:LPCWSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeEx2W';
function DTWAIN_SysInitializeExA(szINIPath:LPCSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeExA';
function DTWAIN_SysInitializeExW(szINIPath:LPCWSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeExW';
function DTWAIN_SysInitializeLib(hInstance:NativeInt) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeLib';
function DTWAIN_SysInitializeLibEx(hInstance:NativeInt; szINIPath:LPCTSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeLibEx';
function DTWAIN_SysInitializeLibEx2(hInstance:NativeInt; szINIPath:LPCTSTR; szImageDLLPath:LPCTSTR; szLangResourcePath:LPCTSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeLibEx2';
function DTWAIN_SysInitializeLibEx2A(hInstance:NativeInt; szINIPath:LPCSTR; szImageDLLPath:LPCSTR; szLangResourcePath:LPCSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeLibEx2A';
function DTWAIN_SysInitializeLibEx2W(hInstance:NativeInt; szINIPath:LPCWSTR; szImageDLLPath:LPCWSTR; szLangResourcePath:LPCWSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeLibEx2W';
function DTWAIN_SysInitializeLibExA(hInstance:NativeInt; szINIPath:LPCSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeLibExA';
function DTWAIN_SysInitializeLibExW(hInstance:NativeInt; szINIPath:LPCWSTR) : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeLibExW';
function DTWAIN_SysInitializeNoBlocking : DTWAIN_HANDLE; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_SysInitializeNoBlocking';
function DTWAIN_TestGetCap(Source:DTWAIN_SOURCE; lCapability:LONG) : DTWAIN_ARRAY; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_TestGetCap';
function DTWAIN_UnlockMemory(h:NativeInt) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_UnlockMemory';
function DTWAIN_UnlockMemoryEx(h:NativeInt) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_UnlockMemoryEx';
function DTWAIN_UpdateCurrentAcquiredImage(Source:DTWAIN_SOURCE; hNewDib:NativeInt) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_UpdateCurrentAcquiredImage';
function DTWAIN_UseMultipleThreads(bSet:BOOL) : BOOL; stdcall;  external 'dtwain32.dll'  name 'DTWAIN_UseMultipleThreads';

implementation
end.
