/*
    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.
*/

package dtwainapi

import "C"

import (
	"bytes"
	"fmt"
	"syscall"
	"unicode/utf16"
	"unsafe"
)

type DTWAIN_ARRAY = unsafe.Pointer
type DTWAIN_SOURCE = unsafe.Pointer
type DTWAIN_HANDLE = unsafe.Pointer
type DTWAIN_OCRTEXTINFOHANDLE = unsafe.Pointer
type HINSTANCE = unsafe.Pointer
type HWND = unsafe.Pointer
type LPDTWAIN_ARRAY = *unsafe.Pointer
type DTWAIN_FRAME = unsafe.Pointer
type DTWAIN_RANGE = unsafe.Pointer
type HANDLE = unsafe.Pointer
type DTWAIN_PDFTEXTELEMENT = unsafe.Pointer
type DTWAIN_IDENTITY = unsafe.Pointer
type DTWAIN_OCRENGINE = unsafe.Pointer
type TWAIN_IDENTITY = unsafe.Pointer
type DTWAIN_MEMORY_PTR = unsafe.Pointer
type DTWAIN_ERROR_PROC = unsafe.Pointer
type DTWAIN_CALLBACK_PROC = unsafe.Pointer
type DTWAIN_CALLBACK_PROC64 = unsafe.Pointer
type DTWAIN_ERROR_PROC64 = unsafe.Pointer
type DTWAIN_LOGGER_PROC = unsafe.Pointer
type DTWAIN_LOGGER_PROCA = unsafe.Pointer
type DTWAIN_LOGGER_PROCW = unsafe.Pointer
type DTWAIN_DIBUPDATE_PROC = unsafe.Pointer
type LPDTWAIN_SOURCE = *unsafe.Pointer
type LPVOID = unsafe.Pointer

// TW_UINTxx equivalents
type (
	TW_UINT32 uint32
	TW_UINT16 uint16
)

// TW_STRxx equivalents
type (
	TW_STR32  [34]byte
	TW_STR64  [66]byte
	TW_STR128 [130]byte
	TW_STR255 [256]byte
)

// TW_VERSION structure
type TW_VERSION struct {
	Major       uint16
	Minor       uint16
	Language    uint16
	Country     uint16
	Info        TW_STR32
}

// TW_IDENTITY structure
type TW_IDENTITY struct {
	Id             TW_UINT32
	Version        TW_VERSION
	ProtocolMajor  TW_UINT16
	ProtocolMinor  TW_UINT16
	SupportedGroups TW_UINT32
	Manufacturer   TW_STR32
	ProductFamily  TW_STR32
	ProductName    TW_STR32
}

// Optional convenience function to get pointer
func (id *TW_IDENTITY) Ptr() uintptr {
	return uintptr(unsafe.Pointer(id))
}

type LPTW_IDENTITY = *TW_IDENTITY


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 = 0x0001
    DTWAIN_CO_SET = 0x0002
    DTWAIN_CO_GETDEFAULT = 0x0004
    DTWAIN_CO_GETCURRENT = 0x0008
    DTWAIN_CO_RESET = 0x0010
    DTWAIN_CO_SETCONSTRAINT = 0x0020
    DTWAIN_CO_CONSTRAINABLE = 0x0040
    DTWAIN_CO_GETHELP = 0x0100
    DTWAIN_CO_GETLABEL = 0x0200
    DTWAIN_CO_GETLABELENUM = 0x0400
    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 = 0x8000
    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 = 0x0000
    DTWAIN_TWTY_INT16 = 0x0001
    DTWAIN_TWTY_INT32 = 0x0002
    DTWAIN_TWTY_UINT8 = 0x0003
    DTWAIN_TWTY_UINT16 = 0x0004
    DTWAIN_TWTY_UINT32 = 0x0005
    DTWAIN_TWTY_BOOL = 0x0006
    DTWAIN_TWTY_FIX32 = 0x0007
    DTWAIN_TWTY_FRAME = 0x0008
    DTWAIN_TWTY_STR32 = 0x0009
    DTWAIN_TWTY_STR64 = 0x000A
    DTWAIN_TWTY_STR128 = 0x000B
    DTWAIN_TWTY_STR255 = 0x000C
    DTWAIN_TWTY_STR1024 = 0x000D
    DTWAIN_TWTY_UNI512 = 0x000E
    DTWAIN_EI_BARCODEX = 0x1200
    DTWAIN_EI_BARCODEY = 0x1201
    DTWAIN_EI_BARCODETEXT = 0x1202
    DTWAIN_EI_BARCODETYPE = 0x1203
    DTWAIN_EI_DESHADETOP = 0x1204
    DTWAIN_EI_DESHADELEFT = 0x1205
    DTWAIN_EI_DESHADEHEIGHT = 0x1206
    DTWAIN_EI_DESHADEWIDTH = 0x1207
    DTWAIN_EI_DESHADESIZE = 0x1208
    DTWAIN_EI_SPECKLESREMOVED = 0x1209
    DTWAIN_EI_HORZLINEXCOORD = 0x120A
    DTWAIN_EI_HORZLINEYCOORD = 0x120B
    DTWAIN_EI_HORZLINELENGTH = 0x120C
    DTWAIN_EI_HORZLINETHICKNESS = 0x120D
    DTWAIN_EI_VERTLINEXCOORD = 0x120E
    DTWAIN_EI_VERTLINEYCOORD = 0x120F
    DTWAIN_EI_VERTLINELENGTH = 0x1210
    DTWAIN_EI_VERTLINETHICKNESS = 0x1211
    DTWAIN_EI_PATCHCODE = 0x1212
    DTWAIN_EI_ENDORSEDTEXT = 0x1213
    DTWAIN_EI_FORMCONFIDENCE = 0x1214
    DTWAIN_EI_FORMTEMPLATEMATCH = 0x1215
    DTWAIN_EI_FORMTEMPLATEPAGEMATCH = 0x1216
    DTWAIN_EI_FORMHORZDOCOFFSET = 0x1217
    DTWAIN_EI_FORMVERTDOCOFFSET = 0x1218
    DTWAIN_EI_BARCODECOUNT = 0x1219
    DTWAIN_EI_BARCODECONFIDENCE = 0x121A
    DTWAIN_EI_BARCODEROTATION = 0x121B
    DTWAIN_EI_BARCODETEXTLENGTH = 0x121C
    DTWAIN_EI_DESHADECOUNT = 0x121D
    DTWAIN_EI_DESHADEBLACKCOUNTOLD = 0x121E
    DTWAIN_EI_DESHADEBLACKCOUNTNEW = 0x121F
    DTWAIN_EI_DESHADEBLACKRLMIN = 0x1220
    DTWAIN_EI_DESHADEBLACKRLMAX = 0x1221
    DTWAIN_EI_DESHADEWHITECOUNTOLD = 0x1222
    DTWAIN_EI_DESHADEWHITECOUNTNEW = 0x1223
    DTWAIN_EI_DESHADEWHITERLMIN = 0x1224
    DTWAIN_EI_DESHADEWHITERLAVE = 0x1225
    DTWAIN_EI_DESHADEWHITERLMAX = 0x1226
    DTWAIN_EI_BLACKSPECKLESREMOVED = 0x1227
    DTWAIN_EI_WHITESPECKLESREMOVED = 0x1228
    DTWAIN_EI_HORZLINECOUNT = 0x1229
    DTWAIN_EI_VERTLINECOUNT = 0x122A
    DTWAIN_EI_DESKEWSTATUS = 0x122B
    DTWAIN_EI_SKEWORIGINALANGLE = 0x122C
    DTWAIN_EI_SKEWFINALANGLE = 0x122D
    DTWAIN_EI_SKEWCONFIDENCE = 0x122E
    DTWAIN_EI_SKEWWINDOWX1 = 0x122F
    DTWAIN_EI_SKEWWINDOWY1 = 0x1230
    DTWAIN_EI_SKEWWINDOWX2 = 0x1231
    DTWAIN_EI_SKEWWINDOWY2 = 0x1232
    DTWAIN_EI_SKEWWINDOWX3 = 0x1233
    DTWAIN_EI_SKEWWINDOWY3 = 0x1234
    DTWAIN_EI_SKEWWINDOWX4 = 0x1235
    DTWAIN_EI_SKEWWINDOWY4 = 0x1236
    DTWAIN_EI_BOOKNAME = 0x1238
    DTWAIN_EI_CHAPTERNUMBER = 0x1239
    DTWAIN_EI_DOCUMENTNUMBER = 0x123A
    DTWAIN_EI_PAGENUMBER = 0x123B
    DTWAIN_EI_CAMERA = 0x123C
    DTWAIN_EI_FRAMENUMBER = 0x123D
    DTWAIN_EI_FRAME = 0x123E
    DTWAIN_EI_PIXELFLAVOR = 0x123F
    DTWAIN_EI_ICCPROFILE = 0x1240
    DTWAIN_EI_LASTSEGMENT = 0x1241
    DTWAIN_EI_SEGMENTNUMBER = 0x1242
    DTWAIN_EI_MAGDATA = 0x1243
    DTWAIN_EI_MAGTYPE = 0x1244
    DTWAIN_EI_PAGESIDE = 0x1245
    DTWAIN_EI_FILESYSTEMSOURCE = 0x1246
    DTWAIN_EI_IMAGEMERGED = 0x1247
    DTWAIN_EI_MAGDATALENGTH = 0x1248
    DTWAIN_EI_PAPERCOUNT = 0x1249
    DTWAIN_EI_PRINTERTEXT = 0x124A
    DTWAIN_EI_TWAINDIRECTMETADATA = 0x124B
    DTWAIN_EI_IAFIELDA_VALUE = 0x124C
    DTWAIN_EI_IAFIELDB_VALUE = 0x124D
    DTWAIN_EI_IAFIELDC_VALUE = 0x124E
    DTWAIN_EI_IAFIELDD_VALUE = 0x124F
    DTWAIN_EI_IAFIELDE_VALUE = 0x1250
    DTWAIN_EI_IALEVEL = 0x1251
    DTWAIN_EI_PRINTER = 0x1252
    DTWAIN_EI_BARCODETEXT2 = 0x1253
    DTWAIN_LOG_DECODE_SOURCE = 0x1      
    DTWAIN_LOG_DECODE_DEST = 0x2        
    DTWAIN_LOG_DECODE_TWMEMREF = 0x4    
    DTWAIN_LOG_DECODE_TWEVENT = 0x8     
    DTWAIN_LOG_CALLSTACK = 0x10         
    DTWAIN_LOG_ISTWAINMSG = 0x20        
    DTWAIN_LOG_INITFAILURE = 0x40       
    DTWAIN_LOG_LOWLEVELTWAIN = 0x80     
    DTWAIN_LOG_DECODE_BITMAP = 0x100    
    DTWAIN_LOG_NOTIFICATIONS = 0x200    
    DTWAIN_LOG_MISCELLANEOUS = 0x400    
    DTWAIN_LOG_DTWAINERRORS = 0x800     
    DTWAIN_LOG_USEFILE = 0x10000        
    DTWAIN_LOG_SHOWEXCEPTIONS = 0x20000 
    DTWAIN_LOG_ERRORMSGBOX = 0x40000    
    DTWAIN_LOG_USEBUFFER = 0x80000      
    DTWAIN_LOG_FILEAPPEND = 0x100000    
    DTWAIN_LOG_USECALLBACK = 0x200000   
    DTWAIN_LOG_USECRLF = 0x400000       
    DTWAIN_LOG_CONSOLE = 0x800000       
    DTWAIN_LOG_DEBUGMONITOR = 0x1000000 
    DTWAIN_LOG_USEWINDOW = 0x2000000    
    DTWAIN_LOG_CREATEDIRECTORY = 0x04000000
    DTWAIN_LOG_CONSOLEWITHHANDLER = 0x08000000 | DTWAIN_LOG_CONSOLE
    DTWAIN_LOG_ALL = DTWAIN_LOG_DECODE_SOURCE | DTWAIN_LOG_DECODE_DEST | DTWAIN_LOG_DECODE_TWEVENT | DTWAIN_LOG_DECODE_TWMEMREF | DTWAIN_LOG_CALLSTACK | DTWAIN_LOG_ISTWAINMSG | DTWAIN_LOG_INITFAILURE | DTWAIN_LOG_LOWLEVELTWAIN | DTWAIN_LOG_NOTIFICATIONS | DTWAIN_LOG_MISCELLANEOUS | DTWAIN_LOG_DTWAINERRORS | DTWAIN_LOG_DECODE_BITMAP
    DTWAIN_LOG_ALL_APPEND = 0xFFFFFFFF
    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 = 0xFFFFFFFC
    DTWAIN_PDF_ALLOWANYMOD = DTWAIN_PDF_ALLOWMOD | DTWAIN_PDF_ALLOWFILLIN | DTWAIN_PDF_ALLOWMODANNOTATIONS | DTWAIN_PDF_ALLOWASSEMBLY
    DTWAIN_PDF_ALLOWANYPRINTING = DTWAIN_PDF_ALLOWPRINTING | 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 | DTWAIN_BP_DETECTADJUSTED
    DTWAIN_BP_DISABLE = -2
    DTWAIN_BP_AUTO = -1
    DTWAIN_BP_AUTODISCARD_ANY = 0xFFFF
    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 = 0x00000001
    DTWAIN_UNLICENSED_VERSION = 0x00000002
    DTWAIN_COMPANY_VERSION = 0x00000004
    DTWAIN_GENERAL_VERSION = 0x00000008
    DTWAIN_DEVELOP_VERSION = 0x00000010
    DTWAIN_JAVA_VERSION = 0x00000020
    DTWAIN_TOOLKIT_VERSION = 0x00000040
    DTWAIN_LIMITEDDLL_VERSION = 0x00000080
    DTWAIN_STATICLIB_VERSION = 0x00000100
    DTWAIN_STATICLIB_STDCALL_VERSION = 0x00000200
    DTWAIN_PDF_VERSION = 0x00010000
    DTWAIN_TWAINSAVE_VERSION = 0x00020000
    DTWAIN_OCR_VERSION = 0x00040000
    DTWAIN_BARCODE_VERSION = 0x00080000
    DTWAIN_ACTIVEX_VERSION = 0x00100000
    DTWAIN_32BIT_VERSION = 0x00200000
    DTWAIN_64BIT_VERSION = 0x00400000
    DTWAIN_UNICODE_VERSION = 0x00800000
    DTWAIN_OPENSOURCE_VERSION = 0x01000000
    DTWAIN_CALLSTACK_LOGGING = 0x02000000
    DTWAIN_CALLSTACK_LOGGING_PLUS = 0x04000000
    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 = 0x8000
    DTWAIN_CV_CAPXFERCOUNT = 0x0001
    DTWAIN_CV_ICAPCOMPRESSION = 0x0100
    DTWAIN_CV_ICAPPIXELTYPE = 0x0101
    DTWAIN_CV_ICAPUNITS = 0x0102
    DTWAIN_CV_ICAPXFERMECH = 0x0103
    DTWAIN_CV_CAPAUTHOR = 0x1000
    DTWAIN_CV_CAPCAPTION = 0x1001
    DTWAIN_CV_CAPFEEDERENABLED = 0x1002
    DTWAIN_CV_CAPFEEDERLOADED = 0x1003
    DTWAIN_CV_CAPTIMEDATE = 0x1004
    DTWAIN_CV_CAPSUPPORTEDCAPS = 0x1005
    DTWAIN_CV_CAPEXTENDEDCAPS = 0x1006
    DTWAIN_CV_CAPAUTOFEED = 0x1007
    DTWAIN_CV_CAPCLEARPAGE = 0x1008
    DTWAIN_CV_CAPFEEDPAGE = 0x1009
    DTWAIN_CV_CAPREWINDPAGE = 0x100a
    DTWAIN_CV_CAPINDICATORS = 0x100b
    DTWAIN_CV_CAPSUPPORTEDCAPSEXT = 0x100c
    DTWAIN_CV_CAPPAPERDETECTABLE = 0x100d
    DTWAIN_CV_CAPUICONTROLLABLE = 0x100e
    DTWAIN_CV_CAPDEVICEONLINE = 0x100f
    DTWAIN_CV_CAPAUTOSCAN = 0x1010
    DTWAIN_CV_CAPTHUMBNAILSENABLED = 0x1011
    DTWAIN_CV_CAPDUPLEX = 0x1012
    DTWAIN_CV_CAPDUPLEXENABLED = 0x1013
    DTWAIN_CV_CAPENABLEDSUIONLY = 0x1014
    DTWAIN_CV_CAPCUSTOMDSDATA = 0x1015
    DTWAIN_CV_CAPENDORSER = 0x1016
    DTWAIN_CV_CAPJOBCONTROL = 0x1017
    DTWAIN_CV_CAPALARMS = 0x1018
    DTWAIN_CV_CAPALARMVOLUME = 0x1019
    DTWAIN_CV_CAPAUTOMATICCAPTURE = 0x101a
    DTWAIN_CV_CAPTIMEBEFOREFIRSTCAPTURE = 0x101b
    DTWAIN_CV_CAPTIMEBETWEENCAPTURES = 0x101c
    DTWAIN_CV_CAPCLEARBUFFERS = 0x101d
    DTWAIN_CV_CAPMAXBATCHBUFFERS = 0x101e
    DTWAIN_CV_CAPDEVICETIMEDATE = 0x101f
    DTWAIN_CV_CAPPOWERSUPPLY = 0x1020
    DTWAIN_CV_CAPCAMERAPREVIEWUI = 0x1021
    DTWAIN_CV_CAPDEVICEEVENT = 0x1022
    DTWAIN_CV_CAPPAGEMULTIPLEACQUIRE = 0x1023
    DTWAIN_CV_CAPSERIALNUMBER = 0x1024
    DTWAIN_CV_CAPFILESYSTEM = 0x1025
    DTWAIN_CV_CAPPRINTER = 0x1026
    DTWAIN_CV_CAPPRINTERENABLED = 0x1027
    DTWAIN_CV_CAPPRINTERINDEX = 0x1028
    DTWAIN_CV_CAPPRINTERMODE = 0x1029
    DTWAIN_CV_CAPPRINTERSTRING = 0x102a
    DTWAIN_CV_CAPPRINTERSUFFIX = 0x102b
    DTWAIN_CV_CAPLANGUAGE = 0x102c
    DTWAIN_CV_CAPFEEDERALIGNMENT = 0x102d
    DTWAIN_CV_CAPFEEDERORDER = 0x102e
    DTWAIN_CV_CAPPAPERBINDING = 0x102f
    DTWAIN_CV_CAPREACQUIREALLOWED = 0x1030
    DTWAIN_CV_CAPPASSTHRU = 0x1031
    DTWAIN_CV_CAPBATTERYMINUTES = 0x1032
    DTWAIN_CV_CAPBATTERYPERCENTAGE = 0x1033
    DTWAIN_CV_CAPPOWERDOWNTIME = 0x1034
    DTWAIN_CV_CAPSEGMENTED = 0x1035
    DTWAIN_CV_CAPCAMERAENABLED = 0x1036
    DTWAIN_CV_CAPCAMERAORDER = 0x1037
    DTWAIN_CV_CAPMICRENABLED = 0x1038
    DTWAIN_CV_CAPFEEDERPREP = 0x1039
    DTWAIN_CV_CAPFEEDERPOCKET = 0x103a
    DTWAIN_CV_CAPAUTOMATICSENSEMEDIUM = 0x103b
    DTWAIN_CV_CAPCUSTOMINTERFACEGUID = 0x103c
    DTWAIN_CV_CAPSUPPORTEDCAPSSEGMENTUNIQUE = 0x103d
    DTWAIN_CV_CAPSUPPORTEDDATS = 0x103e
    DTWAIN_CV_CAPDOUBLEFEEDDETECTION = 0x103f
    DTWAIN_CV_CAPDOUBLEFEEDDETECTIONLENGTH = 0x1040
    DTWAIN_CV_CAPDOUBLEFEEDDETECTIONSENSITIVITY = 0x1041
    DTWAIN_CV_CAPDOUBLEFEEDDETECTIONRESPONSE = 0x1042
    DTWAIN_CV_CAPPAPERHANDLING = 0x1043
    DTWAIN_CV_CAPINDICATORSMODE = 0x1044
    DTWAIN_CV_CAPPRINTERVERTICALOFFSET = 0x1045
    DTWAIN_CV_CAPPOWERSAVETIME = 0x1046
    DTWAIN_CV_CAPPRINTERCHARROTATION = 0x1047
    DTWAIN_CV_CAPPRINTERFONTSTYLE = 0x1048
    DTWAIN_CV_CAPPRINTERINDEXLEADCHAR = 0x1049
    DTWAIN_CV_CAPIMAGEADDRESSENABLED = 0x1050
    DTWAIN_CV_CAPIAFIELDA_LEVEL = 0x1051
    DTWAIN_CV_CAPIAFIELDB_LEVEL = 0x1052
    DTWAIN_CV_CAPIAFIELDC_LEVEL = 0x1053
    DTWAIN_CV_CAPIAFIELDD_LEVEL = 0x1054
    DTWAIN_CV_CAPIAFIELDE_LEVEL = 0x1055
    DTWAIN_CV_CAPIAFIELDA_PRINTFORMAT = 0x1056
    DTWAIN_CV_CAPIAFIELDB_PRINTFORMAT = 0x1057
    DTWAIN_CV_CAPIAFIELDC_PRINTFORMAT = 0x1058
    DTWAIN_CV_CAPIAFIELDD_PRINTFORMAT = 0x1059
    DTWAIN_CV_CAPIAFIELDE_PRINTFORMAT = 0x105A
    DTWAIN_CV_CAPIAFIELDA_VALUE = 0x105B
    DTWAIN_CV_CAPIAFIELDB_VALUE = 0x105C
    DTWAIN_CV_CAPIAFIELDC_VALUE = 0x105D
    DTWAIN_CV_CAPIAFIELDD_VALUE = 0x105E
    DTWAIN_CV_CAPIAFIELDE_VALUE = 0x105F
    DTWAIN_CV_CAPIAFIELDA_LASTPAGE = 0x1060
    DTWAIN_CV_CAPIAFIELDB_LASTPAGE = 0x1061
    DTWAIN_CV_CAPIAFIELDC_LASTPAGE = 0x1062
    DTWAIN_CV_CAPIAFIELDD_LASTPAGE = 0x1063
    DTWAIN_CV_CAPIAFIELDE_LASTPAGE = 0x1064
    DTWAIN_CV_CAPPRINTERINDEXMAXVALUE = 0x104A
    DTWAIN_CV_CAPPRINTERINDEXNUMDIGITS = 0x104B
    DTWAIN_CV_CAPPRINTERINDEXSTEP = 0x104C
    DTWAIN_CV_CAPPRINTERINDEXTRIGGER = 0x104D
    DTWAIN_CV_CAPPRINTERSTRINGPREVIEW = 0x104E
    DTWAIN_CV_ICAPAUTOBRIGHT = 0x1100
    DTWAIN_CV_ICAPBRIGHTNESS = 0x1101
    DTWAIN_CV_ICAPCONTRAST = 0x1103
    DTWAIN_CV_ICAPCUSTHALFTONE = 0x1104
    DTWAIN_CV_ICAPEXPOSURETIME = 0x1105
    DTWAIN_CV_ICAPFILTER = 0x1106
    DTWAIN_CV_ICAPFLASHUSED = 0x1107
    DTWAIN_CV_ICAPGAMMA = 0x1108
    DTWAIN_CV_ICAPHALFTONES = 0x1109
    DTWAIN_CV_ICAPHIGHLIGHT = 0x110a
    DTWAIN_CV_ICAPIMAGEFILEFORMAT = 0x110c
    DTWAIN_CV_ICAPLAMPSTATE = 0x110d
    DTWAIN_CV_ICAPLIGHTSOURCE = 0x110e
    DTWAIN_CV_ICAPORIENTATION = 0x1110
    DTWAIN_CV_ICAPPHYSICALWIDTH = 0x1111
    DTWAIN_CV_ICAPPHYSICALHEIGHT = 0x1112
    DTWAIN_CV_ICAPSHADOW = 0x1113
    DTWAIN_CV_ICAPFRAMES = 0x1114
    DTWAIN_CV_ICAPXNATIVERESOLUTION = 0x1116
    DTWAIN_CV_ICAPYNATIVERESOLUTION = 0x1117
    DTWAIN_CV_ICAPXRESOLUTION = 0x1118
    DTWAIN_CV_ICAPYRESOLUTION = 0x1119
    DTWAIN_CV_ICAPMAXFRAMES = 0x111a
    DTWAIN_CV_ICAPTILES = 0x111b
    DTWAIN_CV_ICAPBITORDER = 0x111c
    DTWAIN_CV_ICAPCCITTKFACTOR = 0x111d
    DTWAIN_CV_ICAPLIGHTPATH = 0x111e
    DTWAIN_CV_ICAPPIXELFLAVOR = 0x111f
    DTWAIN_CV_ICAPPLANARCHUNKY = 0x1120
    DTWAIN_CV_ICAPROTATION = 0x1121
    DTWAIN_CV_ICAPSUPPORTEDSIZES = 0x1122
    DTWAIN_CV_ICAPTHRESHOLD = 0x1123
    DTWAIN_CV_ICAPXSCALING = 0x1124
    DTWAIN_CV_ICAPYSCALING = 0x1125
    DTWAIN_CV_ICAPBITORDERCODES = 0x1126
    DTWAIN_CV_ICAPPIXELFLAVORCODES = 0x1127
    DTWAIN_CV_ICAPJPEGPIXELTYPE = 0x1128
    DTWAIN_CV_ICAPTIMEFILL = 0x112a
    DTWAIN_CV_ICAPBITDEPTH = 0x112b
    DTWAIN_CV_ICAPBITDEPTHREDUCTION = 0x112c
    DTWAIN_CV_ICAPUNDEFINEDIMAGESIZE = 0x112d
    DTWAIN_CV_ICAPIMAGEDATASET = 0x112e
    DTWAIN_CV_ICAPEXTIMAGEINFO = 0x112f
    DTWAIN_CV_ICAPMINIMUMHEIGHT = 0x1130
    DTWAIN_CV_ICAPMINIMUMWIDTH = 0x1131
    DTWAIN_CV_ICAPAUTOBORDERDETECTION = 0x1132
    DTWAIN_CV_ICAPAUTODESKEW = 0x1133
    DTWAIN_CV_ICAPAUTODISCARDBLANKPAGES = 0x1134
    DTWAIN_CV_ICAPAUTOROTATE = 0x1135
    DTWAIN_CV_ICAPFLIPROTATION = 0x1136
    DTWAIN_CV_ICAPBARCODEDETECTIONENABLED = 0x1137
    DTWAIN_CV_ICAPSUPPORTEDBARCODETYPES = 0x1138
    DTWAIN_CV_ICAPBARCODEMAXSEARCHPRIORITIES = 0x1139
    DTWAIN_CV_ICAPBARCODESEARCHPRIORITIES = 0x113a
    DTWAIN_CV_ICAPBARCODESEARCHMODE = 0x113b
    DTWAIN_CV_ICAPBARCODEMAXRETRIES = 0x113c
    DTWAIN_CV_ICAPBARCODETIMEOUT = 0x113d
    DTWAIN_CV_ICAPZOOMFACTOR = 0x113e
    DTWAIN_CV_ICAPPATCHCODEDETECTIONENABLED = 0x113f
    DTWAIN_CV_ICAPSUPPORTEDPATCHCODETYPES = 0x1140
    DTWAIN_CV_ICAPPATCHCODEMAXSEARCHPRIORITIES = 0x1141
    DTWAIN_CV_ICAPPATCHCODESEARCHPRIORITIES = 0x1142
    DTWAIN_CV_ICAPPATCHCODESEARCHMODE = 0x1143
    DTWAIN_CV_ICAPPATCHCODEMAXRETRIES = 0x1144
    DTWAIN_CV_ICAPPATCHCODETIMEOUT = 0x1145
    DTWAIN_CV_ICAPFLASHUSED2 = 0x1146
    DTWAIN_CV_ICAPIMAGEFILTER = 0x1147
    DTWAIN_CV_ICAPNOISEFILTER = 0x1148
    DTWAIN_CV_ICAPOVERSCAN = 0x1149
    DTWAIN_CV_ICAPAUTOMATICBORDERDETECTION = 0x1150
    DTWAIN_CV_ICAPAUTOMATICDESKEW = 0x1151
    DTWAIN_CV_ICAPAUTOMATICROTATE = 0x1152
    DTWAIN_CV_ICAPJPEGQUALITY = 0x1153
    DTWAIN_CV_ICAPFEEDERTYPE = 0x1154
    DTWAIN_CV_ICAPICCPROFILE = 0x1155
    DTWAIN_CV_ICAPAUTOSIZE = 0x1156
    DTWAIN_CV_ICAPAUTOMATICCROPUSESFRAME = 0x1157
    DTWAIN_CV_ICAPAUTOMATICLENGTHDETECTION = 0x1158
    DTWAIN_CV_ICAPAUTOMATICCOLORENABLED = 0x1159
    DTWAIN_CV_ICAPAUTOMATICCOLORNONCOLORPIXELTYPE = 0x115a
    DTWAIN_CV_ICAPCOLORMANAGEMENTENABLED = 0x115b
    DTWAIN_CV_ICAPIMAGEMERGE = 0x115c
    DTWAIN_CV_ICAPIMAGEMERGEHEIGHTTHRESHOLD = 0x115d
    DTWAIN_CV_ICAPSUPPORTEDEXTIMAGEINFO = 0x115e
    DTWAIN_CV_ICAPFILMTYPE = 0x115f
    DTWAIN_CV_ICAPMIRROR = 0x1160
    DTWAIN_CV_ICAPJPEGSUBSAMPLING = 0x1161
    DTWAIN_CV_ACAPAUDIOFILEFORMAT = 0x1201
    DTWAIN_CV_ACAPXFERMECH = 0x1202
    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 = 0x1000
    DTWAIN_OCRCV_DESKEW = 0x1001
    DTWAIN_OCRCV_DESHADE = 0x1002
    DTWAIN_OCRCV_ORIENTATION = 0x1003
    DTWAIN_OCRCV_NOISEREMOVE = 0x1004
    DTWAIN_OCRCV_LINEREMOVE = 0x1005
    DTWAIN_OCRCV_INVERTPAGE = 0x1006
    DTWAIN_OCRCV_INVERTZONES = 0x1007
    DTWAIN_OCRCV_LINEREJECT = 0x1008
    DTWAIN_OCRCV_CHARACTERREJECT = 0x1009
    DTWAIN_OCRCV_ERRORREPORTMODE = 0x1010
    DTWAIN_OCRCV_ERRORREPORTFILE = 0x1011
    DTWAIN_OCRCV_PIXELTYPE = 0x1012
    DTWAIN_OCRCV_BITDEPTH = 0x1013
    DTWAIN_OCRCV_RETURNCHARINFO = 0x1014
    DTWAIN_OCRCV_NATIVEFILEFORMAT = 0x1015
    DTWAIN_OCRCV_MPNATIVEFILEFORMAT = 0x1016
    DTWAIN_OCRCV_SUPPORTEDCAPS = 0x1017
    DTWAIN_OCRCV_DISABLECHARACTERS = 0x1018
    DTWAIN_OCRCV_REMOVECONTROLCHARS = 0x1019
    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 = 0x00000001
    DTWAIN_PDFTEXT_EVENPAGES = 0x00000002
    DTWAIN_PDFTEXT_ODDPAGES = 0x00000004
    DTWAIN_PDFTEXT_FIRSTPAGE = 0x00000008
    DTWAIN_PDFTEXT_LASTPAGE = 0x00000010
    DTWAIN_PDFTEXT_CURRENTPAGE = 0x00000020
    DTWAIN_PDFTEXT_DISABLED = 0x00000040
    DTWAIN_PDFTEXT_TOPLEFT = 0x00000100
    DTWAIN_PDFTEXT_TOPRIGHT = 0x00000200
    DTWAIN_PDFTEXT_HORIZCENTER = 0x00000400
    DTWAIN_PDFTEXT_VERTCENTER = 0x00000800
    DTWAIN_PDFTEXT_BOTTOMLEFT = 0x00001000
    DTWAIN_PDFTEXT_BOTTOMRIGHT = 0x00002000
    DTWAIN_PDFTEXT_BOTTOMCENTER = 0x00004000
    DTWAIN_PDFTEXT_TOPCENTER = 0x00008000
    DTWAIN_PDFTEXT_XCENTER = 0x00010000
    DTWAIN_PDFTEXT_YCENTER = 0x00020000
    DTWAIN_PDFTEXT_NOSCALING = 0x00100000
    DTWAIN_PDFTEXT_NOCHARSPACING = 0x00200000
    DTWAIN_PDFTEXT_NOWORDSPACING = 0x00400000
    DTWAIN_PDFTEXT_NOSTROKEWIDTH = 0x00800000
    DTWAIN_PDFTEXT_NORENDERMODE = 0x01000000
    DTWAIN_PDFTEXT_NORGBCOLOR = 0x02000000
    DTWAIN_PDFTEXT_NOFONTSIZE = 0x04000000
    DTWAIN_PDFTEXT_NOABSPOSITION = 0x08000000
    DTWAIN_PDFTEXT_NOROTATION = 0x10000000
    DTWAIN_PDFTEXT_NOSKEWING = 0x20000000
    DTWAIN_PDFTEXT_NOSCALINGXY = 0x40000000
    DTWAIN_PDFTEXT_IGNOREALL = 0xFFF00000
    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
)

// DLL represents a runtime-loaded Windows DLL.
type DTWAIN_DLL struct {
    Path   string
    Handle syscall.Handle
    procs  map[string]uintptr
}

// Load loads the DLL from a file path.
func Load_DTWAINDLL(path string) (*DTWAIN_DLL, error) {
    d, err := load_dll(path)
    if d == nil {
        return nil, err
    }

    var arr [1169] string
    arr[0] = "DTWAIN_AcquireAudioFile"
    arr[1] = "DTWAIN_AcquireAudioFileA"
    arr[2] = "DTWAIN_AcquireAudioFileW"
    arr[3] = "DTWAIN_AcquireAudioNative"
    arr[4] = "DTWAIN_AcquireAudioNativeEx"
    arr[5] = "DTWAIN_AcquireBuffered"
    arr[6] = "DTWAIN_AcquireBufferedEx"
    arr[7] = "DTWAIN_AcquireFile"
    arr[8] = "DTWAIN_AcquireFileA"
    arr[9] = "DTWAIN_AcquireFileEx"
    arr[10] = "DTWAIN_AcquireFileW"
    arr[11] = "DTWAIN_AcquireNative"
    arr[12] = "DTWAIN_AcquireNativeEx"
    arr[13] = "DTWAIN_AcquireToClipboard"
    arr[14] = "DTWAIN_AddExtImageInfoQuery"
    arr[15] = "DTWAIN_AddPDFText"
    arr[16] = "DTWAIN_AddPDFTextA"
    arr[17] = "DTWAIN_AddPDFTextElement"
    arr[18] = "DTWAIN_AddPDFTextEx"
    arr[19] = "DTWAIN_AddPDFTextExA"
    arr[20] = "DTWAIN_AddPDFTextExW"
    arr[21] = "DTWAIN_AddPDFTextString"
    arr[22] = "DTWAIN_AddPDFTextStringA"
    arr[23] = "DTWAIN_AddPDFTextStringW"
    arr[24] = "DTWAIN_AddPDFTextW"
    arr[25] = "DTWAIN_AllocateMemory"
    arr[26] = "DTWAIN_AllocateMemory64"
    arr[27] = "DTWAIN_AllocateMemoryEx"
    arr[28] = "DTWAIN_AppHandlesExceptions"
    arr[29] = "DTWAIN_ArrayANSIStringToFloat"
    arr[30] = "DTWAIN_ArrayAdd"
    arr[31] = "DTWAIN_ArrayAddANSIString"
    arr[32] = "DTWAIN_ArrayAddANSIStringN"
    arr[33] = "DTWAIN_ArrayAddFloat"
    arr[34] = "DTWAIN_ArrayAddFloatN"
    arr[35] = "DTWAIN_ArrayAddFloatString"
    arr[36] = "DTWAIN_ArrayAddFloatStringA"
    arr[37] = "DTWAIN_ArrayAddFloatStringN"
    arr[38] = "DTWAIN_ArrayAddFloatStringNA"
    arr[39] = "DTWAIN_ArrayAddFloatStringNW"
    arr[40] = "DTWAIN_ArrayAddFloatStringW"
    arr[41] = "DTWAIN_ArrayAddFrame"
    arr[42] = "DTWAIN_ArrayAddFrameN"
    arr[43] = "DTWAIN_ArrayAddLong"
    arr[44] = "DTWAIN_ArrayAddLong64"
    arr[45] = "DTWAIN_ArrayAddLong64N"
    arr[46] = "DTWAIN_ArrayAddLongN"
    arr[47] = "DTWAIN_ArrayAddN"
    arr[48] = "DTWAIN_ArrayAddString"
    arr[49] = "DTWAIN_ArrayAddStringA"
    arr[50] = "DTWAIN_ArrayAddStringN"
    arr[51] = "DTWAIN_ArrayAddStringNA"
    arr[52] = "DTWAIN_ArrayAddStringNW"
    arr[53] = "DTWAIN_ArrayAddStringW"
    arr[54] = "DTWAIN_ArrayAddWideString"
    arr[55] = "DTWAIN_ArrayAddWideStringN"
    arr[56] = "DTWAIN_ArrayConvertFix32ToFloat"
    arr[57] = "DTWAIN_ArrayConvertFloatToFix32"
    arr[58] = "DTWAIN_ArrayCopy"
    arr[59] = "DTWAIN_ArrayCreate"
    arr[60] = "DTWAIN_ArrayCreateCopy"
    arr[61] = "DTWAIN_ArrayCreateFromCap"
    arr[62] = "DTWAIN_ArrayCreateFromLong64s"
    arr[63] = "DTWAIN_ArrayCreateFromLongs"
    arr[64] = "DTWAIN_ArrayCreateFromReals"
    arr[65] = "DTWAIN_ArrayDestroy"
    arr[66] = "DTWAIN_ArrayDestroyFrames"
    arr[67] = "DTWAIN_ArrayDumpToLog"
    arr[68] = "DTWAIN_ArrayFind"
    arr[69] = "DTWAIN_ArrayFindANSIString"
    arr[70] = "DTWAIN_ArrayFindFloat"
    arr[71] = "DTWAIN_ArrayFindFloatString"
    arr[72] = "DTWAIN_ArrayFindFloatStringA"
    arr[73] = "DTWAIN_ArrayFindFloatStringW"
    arr[74] = "DTWAIN_ArrayFindLong"
    arr[75] = "DTWAIN_ArrayFindLong64"
    arr[76] = "DTWAIN_ArrayFindString"
    arr[77] = "DTWAIN_ArrayFindStringA"
    arr[78] = "DTWAIN_ArrayFindStringW"
    arr[79] = "DTWAIN_ArrayFindWideString"
    arr[80] = "DTWAIN_ArrayFix32GetAt"
    arr[81] = "DTWAIN_ArrayFix32SetAt"
    arr[82] = "DTWAIN_ArrayFloatToANSIString"
    arr[83] = "DTWAIN_ArrayFloatToString"
    arr[84] = "DTWAIN_ArrayFloatToWideString"
    arr[85] = "DTWAIN_ArrayGetAt"
    arr[86] = "DTWAIN_ArrayGetAtANSIString"
    arr[87] = "DTWAIN_ArrayGetAtFloat"
    arr[88] = "DTWAIN_ArrayGetAtFloatEx"
    arr[89] = "DTWAIN_ArrayGetAtFloatString"
    arr[90] = "DTWAIN_ArrayGetAtFloatStringA"
    arr[91] = "DTWAIN_ArrayGetAtFloatStringW"
    arr[92] = "DTWAIN_ArrayGetAtFrame"
    arr[93] = "DTWAIN_ArrayGetAtFrameEx"
    arr[94] = "DTWAIN_ArrayGetAtFrameString"
    arr[95] = "DTWAIN_ArrayGetAtFrameStringA"
    arr[96] = "DTWAIN_ArrayGetAtFrameStringW"
    arr[97] = "DTWAIN_ArrayGetAtLong"
    arr[98] = "DTWAIN_ArrayGetAtLong64"
    arr[99] = "DTWAIN_ArrayGetAtLong64Ex"
    arr[100] = "DTWAIN_ArrayGetAtLongEx"
    arr[101] = "DTWAIN_ArrayGetAtSource"
    arr[102] = "DTWAIN_ArrayGetAtSourceEx"
    arr[103] = "DTWAIN_ArrayGetAtString"
    arr[104] = "DTWAIN_ArrayGetAtStringA"
    arr[105] = "DTWAIN_ArrayGetAtStringW"
    arr[106] = "DTWAIN_ArrayGetAtWideString"
    arr[107] = "DTWAIN_ArrayGetBuffer"
    arr[108] = "DTWAIN_ArrayGetCapValues"
    arr[109] = "DTWAIN_ArrayGetCapValuesEx"
    arr[110] = "DTWAIN_ArrayGetCapValuesEx2"
    arr[111] = "DTWAIN_ArrayGetCount"
    arr[112] = "DTWAIN_ArrayGetMaxStringLength"
    arr[113] = "DTWAIN_ArrayGetSourceAt"
    arr[114] = "DTWAIN_ArrayGetStringLength"
    arr[115] = "DTWAIN_ArrayGetType"
    arr[116] = "DTWAIN_ArrayInit"
    arr[117] = "DTWAIN_ArrayInsertAt"
    arr[118] = "DTWAIN_ArrayInsertAtANSIString"
    arr[119] = "DTWAIN_ArrayInsertAtANSIStringN"
    arr[120] = "DTWAIN_ArrayInsertAtFloat"
    arr[121] = "DTWAIN_ArrayInsertAtFloatN"
    arr[122] = "DTWAIN_ArrayInsertAtFloatString"
    arr[123] = "DTWAIN_ArrayInsertAtFloatStringA"
    arr[124] = "DTWAIN_ArrayInsertAtFloatStringN"
    arr[125] = "DTWAIN_ArrayInsertAtFloatStringNA"
    arr[126] = "DTWAIN_ArrayInsertAtFloatStringNW"
    arr[127] = "DTWAIN_ArrayInsertAtFloatStringW"
    arr[128] = "DTWAIN_ArrayInsertAtFrame"
    arr[129] = "DTWAIN_ArrayInsertAtFrameN"
    arr[130] = "DTWAIN_ArrayInsertAtLong"
    arr[131] = "DTWAIN_ArrayInsertAtLong64"
    arr[132] = "DTWAIN_ArrayInsertAtLong64N"
    arr[133] = "DTWAIN_ArrayInsertAtLongN"
    arr[134] = "DTWAIN_ArrayInsertAtN"
    arr[135] = "DTWAIN_ArrayInsertAtString"
    arr[136] = "DTWAIN_ArrayInsertAtStringA"
    arr[137] = "DTWAIN_ArrayInsertAtStringN"
    arr[138] = "DTWAIN_ArrayInsertAtStringNA"
    arr[139] = "DTWAIN_ArrayInsertAtStringNW"
    arr[140] = "DTWAIN_ArrayInsertAtStringW"
    arr[141] = "DTWAIN_ArrayInsertAtWideString"
    arr[142] = "DTWAIN_ArrayInsertAtWideStringN"
    arr[143] = "DTWAIN_ArrayRemoveAll"
    arr[144] = "DTWAIN_ArrayRemoveAt"
    arr[145] = "DTWAIN_ArrayRemoveAtN"
    arr[146] = "DTWAIN_ArrayResize"
    arr[147] = "DTWAIN_ArraySetAt"
    arr[148] = "DTWAIN_ArraySetAtANSIString"
    arr[149] = "DTWAIN_ArraySetAtFloat"
    arr[150] = "DTWAIN_ArraySetAtFloatString"
    arr[151] = "DTWAIN_ArraySetAtFloatStringA"
    arr[152] = "DTWAIN_ArraySetAtFloatStringW"
    arr[153] = "DTWAIN_ArraySetAtFrame"
    arr[154] = "DTWAIN_ArraySetAtFrameEx"
    arr[155] = "DTWAIN_ArraySetAtFrameString"
    arr[156] = "DTWAIN_ArraySetAtFrameStringA"
    arr[157] = "DTWAIN_ArraySetAtFrameStringW"
    arr[158] = "DTWAIN_ArraySetAtLong"
    arr[159] = "DTWAIN_ArraySetAtLong64"
    arr[160] = "DTWAIN_ArraySetAtString"
    arr[161] = "DTWAIN_ArraySetAtStringA"
    arr[162] = "DTWAIN_ArraySetAtStringW"
    arr[163] = "DTWAIN_ArraySetAtWideString"
    arr[164] = "DTWAIN_ArrayStringToFloat"
    arr[165] = "DTWAIN_ArrayWideStringToFloat"
    arr[166] = "DTWAIN_CallCallback"
    arr[167] = "DTWAIN_CallCallback64"
    arr[168] = "DTWAIN_CallDSMProc"
    arr[169] = "DTWAIN_CheckHandles"
    arr[170] = "DTWAIN_ClearBuffers"
    arr[171] = "DTWAIN_ClearErrorBuffer"
    arr[172] = "DTWAIN_ClearPDFTextElements"
    arr[173] = "DTWAIN_ClearPage"
    arr[174] = "DTWAIN_CloseSource"
    arr[175] = "DTWAIN_CloseSourceUI"
    arr[176] = "DTWAIN_ConvertDIBToBitmap"
    arr[177] = "DTWAIN_ConvertDIBToFullBitmap"
    arr[178] = "DTWAIN_ConvertToAPIString"
    arr[179] = "DTWAIN_ConvertToAPIStringA"
    arr[180] = "DTWAIN_ConvertToAPIStringEx"
    arr[181] = "DTWAIN_ConvertToAPIStringExA"
    arr[182] = "DTWAIN_ConvertToAPIStringExW"
    arr[183] = "DTWAIN_ConvertToAPIStringW"
    arr[184] = "DTWAIN_CreateAcquisitionArray"
    arr[185] = "DTWAIN_CreatePDFTextElement"
    arr[186] = "DTWAIN_CreatePDFTextElementCopy"
    arr[187] = "DTWAIN_DeleteDIB"
    arr[188] = "DTWAIN_DestroyAcquisitionArray"
    arr[189] = "DTWAIN_DestroyPDFTextElement"
    arr[190] = "DTWAIN_DisableAppWindow"
    arr[191] = "DTWAIN_EnableAutoBorderDetect"
    arr[192] = "DTWAIN_EnableAutoBright"
    arr[193] = "DTWAIN_EnableAutoDeskew"
    arr[194] = "DTWAIN_EnableAutoFeed"
    arr[195] = "DTWAIN_EnableAutoRotate"
    arr[196] = "DTWAIN_EnableAutoScan"
    arr[197] = "DTWAIN_EnableAutomaticSenseMedium"
    arr[198] = "DTWAIN_EnableBarcodeDetection"
    arr[199] = "DTWAIN_EnableDuplex"
    arr[200] = "DTWAIN_EnableFeeder"
    arr[201] = "DTWAIN_EnableGetMessageLoop"
    arr[202] = "DTWAIN_EnableGetMessageLoopDetection"
    arr[203] = "DTWAIN_EnableIndicator"
    arr[204] = "DTWAIN_EnableJobFileHandling"
    arr[205] = "DTWAIN_EnableLamp"
    arr[206] = "DTWAIN_EnableMsgNotify"
    arr[207] = "DTWAIN_EnablePatchcodeDetection"
    arr[208] = "DTWAIN_EnablePeekMessageLoop"
    arr[209] = "DTWAIN_EnablePrinter"
    arr[210] = "DTWAIN_EnableThumbnail"
    arr[211] = "DTWAIN_EnableTripletsNotify"
    arr[212] = "DTWAIN_EndThread"
    arr[213] = "DTWAIN_EndTwainSession"
    arr[214] = "DTWAIN_EnumAlarmVolumes"
    arr[215] = "DTWAIN_EnumAlarmVolumesEx"
    arr[216] = "DTWAIN_EnumAlarms"
    arr[217] = "DTWAIN_EnumAlarmsEx"
    arr[218] = "DTWAIN_EnumAudioXferMechs"
    arr[219] = "DTWAIN_EnumAudioXferMechsEx"
    arr[220] = "DTWAIN_EnumAutoFeedValues"
    arr[221] = "DTWAIN_EnumAutoFeedValuesEx"
    arr[222] = "DTWAIN_EnumAutomaticCaptures"
    arr[223] = "DTWAIN_EnumAutomaticCapturesEx"
    arr[224] = "DTWAIN_EnumAutomaticSenseMedium"
    arr[225] = "DTWAIN_EnumAutomaticSenseMediumEx"
    arr[226] = "DTWAIN_EnumBarcodeCodes"
    arr[227] = "DTWAIN_EnumBarcodeCodesEx"
    arr[228] = "DTWAIN_EnumBarcodeMaxPriorities"
    arr[229] = "DTWAIN_EnumBarcodeMaxPrioritiesEx"
    arr[230] = "DTWAIN_EnumBarcodeMaxRetries"
    arr[231] = "DTWAIN_EnumBarcodeMaxRetriesEx"
    arr[232] = "DTWAIN_EnumBarcodePriorities"
    arr[233] = "DTWAIN_EnumBarcodePrioritiesEx"
    arr[234] = "DTWAIN_EnumBarcodeSearchModes"
    arr[235] = "DTWAIN_EnumBarcodeSearchModesEx"
    arr[236] = "DTWAIN_EnumBarcodeTimeOutValues"
    arr[237] = "DTWAIN_EnumBarcodeTimeOutValuesEx"
    arr[238] = "DTWAIN_EnumBitDepths"
    arr[239] = "DTWAIN_EnumBitDepthsEx"
    arr[240] = "DTWAIN_EnumBitDepthsEx2"
    arr[241] = "DTWAIN_EnumBottomCameras"
    arr[242] = "DTWAIN_EnumBottomCamerasEx"
    arr[243] = "DTWAIN_EnumBrightnessValues"
    arr[244] = "DTWAIN_EnumBrightnessValuesEx"
    arr[245] = "DTWAIN_EnumCameras"
    arr[246] = "DTWAIN_EnumCamerasEx"
    arr[247] = "DTWAIN_EnumCamerasEx2"
    arr[248] = "DTWAIN_EnumCapLabels"
    arr[249] = "DTWAIN_EnumCompressionTypes"
    arr[250] = "DTWAIN_EnumCompressionTypesEx"
    arr[251] = "DTWAIN_EnumCompressionTypesEx2"
    arr[252] = "DTWAIN_EnumContrastValues"
    arr[253] = "DTWAIN_EnumContrastValuesEx"
    arr[254] = "DTWAIN_EnumCustomCaps"
    arr[255] = "DTWAIN_EnumCustomCapsEx"
    arr[256] = "DTWAIN_EnumDoubleFeedDetectLengths"
    arr[257] = "DTWAIN_EnumDoubleFeedDetectLengthsEx"
    arr[258] = "DTWAIN_EnumDoubleFeedDetectValues"
    arr[259] = "DTWAIN_EnumDoubleFeedDetectValuesEx"
    arr[260] = "DTWAIN_EnumExtImageInfoTypes"
    arr[261] = "DTWAIN_EnumExtImageInfoTypesEx"
    arr[262] = "DTWAIN_EnumExtendedCaps"
    arr[263] = "DTWAIN_EnumExtendedCapsEx"
    arr[264] = "DTWAIN_EnumExtendedCapsEx2"
    arr[265] = "DTWAIN_EnumFileTypeBitsPerPixel"
    arr[266] = "DTWAIN_EnumFileXferFormats"
    arr[267] = "DTWAIN_EnumFileXferFormatsEx"
    arr[268] = "DTWAIN_EnumHalftones"
    arr[269] = "DTWAIN_EnumHalftonesEx"
    arr[270] = "DTWAIN_EnumHighlightValues"
    arr[271] = "DTWAIN_EnumHighlightValuesEx"
    arr[272] = "DTWAIN_EnumJobControls"
    arr[273] = "DTWAIN_EnumJobControlsEx"
    arr[274] = "DTWAIN_EnumLightPaths"
    arr[275] = "DTWAIN_EnumLightPathsEx"
    arr[276] = "DTWAIN_EnumLightSources"
    arr[277] = "DTWAIN_EnumLightSourcesEx"
    arr[278] = "DTWAIN_EnumMaxBuffers"
    arr[279] = "DTWAIN_EnumMaxBuffersEx"
    arr[280] = "DTWAIN_EnumNoiseFilters"
    arr[281] = "DTWAIN_EnumNoiseFiltersEx"
    arr[282] = "DTWAIN_EnumOCRInterfaces"
    arr[283] = "DTWAIN_EnumOCRInterfacesEx"
    arr[284] = "DTWAIN_EnumOCRSupportedCaps"
    arr[285] = "DTWAIN_EnumOrientations"
    arr[286] = "DTWAIN_EnumOrientationsEx"
    arr[287] = "DTWAIN_EnumOverscanValues"
    arr[288] = "DTWAIN_EnumOverscanValuesEx"
    arr[289] = "DTWAIN_EnumPaperSizes"
    arr[290] = "DTWAIN_EnumPaperSizesEx"
    arr[291] = "DTWAIN_EnumPatchcodeCodes"
    arr[292] = "DTWAIN_EnumPatchcodeCodesEx"
    arr[293] = "DTWAIN_EnumPatchcodeMaxPriorities"
    arr[294] = "DTWAIN_EnumPatchcodeMaxPrioritiesEx"
    arr[295] = "DTWAIN_EnumPatchcodeMaxRetries"
    arr[296] = "DTWAIN_EnumPatchcodeMaxRetriesEx"
    arr[297] = "DTWAIN_EnumPatchcodePriorities"
    arr[298] = "DTWAIN_EnumPatchcodePrioritiesEx"
    arr[299] = "DTWAIN_EnumPatchcodeSearchModes"
    arr[300] = "DTWAIN_EnumPatchcodeSearchModesEx"
    arr[301] = "DTWAIN_EnumPatchcodeTimeOutValues"
    arr[302] = "DTWAIN_EnumPatchcodeTimeOutValuesEx"
    arr[303] = "DTWAIN_EnumPixelTypes"
    arr[304] = "DTWAIN_EnumPixelTypesEx"
    arr[305] = "DTWAIN_EnumPrinterStringModes"
    arr[306] = "DTWAIN_EnumPrinterStringModesEx"
    arr[307] = "DTWAIN_EnumResolutionValues"
    arr[308] = "DTWAIN_EnumResolutionValuesEx"
    arr[309] = "DTWAIN_EnumShadowValues"
    arr[310] = "DTWAIN_EnumShadowValuesEx"
    arr[311] = "DTWAIN_EnumSourceUnits"
    arr[312] = "DTWAIN_EnumSourceUnitsEx"
    arr[313] = "DTWAIN_EnumSourceValues"
    arr[314] = "DTWAIN_EnumSourceValuesA"
    arr[315] = "DTWAIN_EnumSourceValuesW"
    arr[316] = "DTWAIN_EnumSources"
    arr[317] = "DTWAIN_EnumSourcesEx"
    arr[318] = "DTWAIN_EnumSupportedCaps"
    arr[319] = "DTWAIN_EnumSupportedCapsEx"
    arr[320] = "DTWAIN_EnumSupportedCapsEx2"
    arr[321] = "DTWAIN_EnumSupportedExtImageInfo"
    arr[322] = "DTWAIN_EnumSupportedExtImageInfoEx"
    arr[323] = "DTWAIN_EnumSupportedFileTypes"
    arr[324] = "DTWAIN_EnumSupportedMultiPageFileTypes"
    arr[325] = "DTWAIN_EnumSupportedSinglePageFileTypes"
    arr[326] = "DTWAIN_EnumThresholdValues"
    arr[327] = "DTWAIN_EnumThresholdValuesEx"
    arr[328] = "DTWAIN_EnumTopCameras"
    arr[329] = "DTWAIN_EnumTopCamerasEx"
    arr[330] = "DTWAIN_EnumTwainPrinters"
    arr[331] = "DTWAIN_EnumTwainPrintersEx"
    arr[332] = "DTWAIN_EnumXResolutionValues"
    arr[333] = "DTWAIN_EnumXResolutionValuesEx"
    arr[334] = "DTWAIN_EnumYResolutionValues"
    arr[335] = "DTWAIN_EnumYResolutionValuesEx"
    arr[336] = "DTWAIN_ExecuteOCR"
    arr[337] = "DTWAIN_ExecuteOCRA"
    arr[338] = "DTWAIN_ExecuteOCRW"
    arr[339] = "DTWAIN_FeedPage"
    arr[340] = "DTWAIN_FlipBitmap"
    arr[341] = "DTWAIN_FlushAcquiredPages"
    arr[342] = "DTWAIN_FrameCreate"
    arr[343] = "DTWAIN_FrameCreateString"
    arr[344] = "DTWAIN_FrameCreateStringA"
    arr[345] = "DTWAIN_FrameCreateStringW"
    arr[346] = "DTWAIN_FrameDestroy"
    arr[347] = "DTWAIN_FrameGetAll"
    arr[348] = "DTWAIN_FrameGetAllString"
    arr[349] = "DTWAIN_FrameGetAllStringA"
    arr[350] = "DTWAIN_FrameGetAllStringW"
    arr[351] = "DTWAIN_FrameGetValue"
    arr[352] = "DTWAIN_FrameGetValueString"
    arr[353] = "DTWAIN_FrameGetValueStringA"
    arr[354] = "DTWAIN_FrameGetValueStringW"
    arr[355] = "DTWAIN_FrameIsValid"
    arr[356] = "DTWAIN_FrameSetAll"
    arr[357] = "DTWAIN_FrameSetAllString"
    arr[358] = "DTWAIN_FrameSetAllStringA"
    arr[359] = "DTWAIN_FrameSetAllStringW"
    arr[360] = "DTWAIN_FrameSetValue"
    arr[361] = "DTWAIN_FrameSetValueString"
    arr[362] = "DTWAIN_FrameSetValueStringA"
    arr[363] = "DTWAIN_FrameSetValueStringW"
    arr[364] = "DTWAIN_FreeExtImageInfo"
    arr[365] = "DTWAIN_FreeMemory"
    arr[366] = "DTWAIN_FreeMemoryEx"
    arr[367] = "DTWAIN_GetAPIHandleStatus"
    arr[368] = "DTWAIN_GetAcquireArea"
    arr[369] = "DTWAIN_GetAcquireArea2"
    arr[370] = "DTWAIN_GetAcquireArea2String"
    arr[371] = "DTWAIN_GetAcquireArea2StringA"
    arr[372] = "DTWAIN_GetAcquireArea2StringW"
    arr[373] = "DTWAIN_GetAcquireAreaEx"
    arr[374] = "DTWAIN_GetAcquireMetrics"
    arr[375] = "DTWAIN_GetAcquireStripBuffer"
    arr[376] = "DTWAIN_GetAcquireStripData"
    arr[377] = "DTWAIN_GetAcquireStripSizes"
    arr[378] = "DTWAIN_GetAcquiredImage"
    arr[379] = "DTWAIN_GetAcquiredImageArray"
    arr[380] = "DTWAIN_GetAcquisitionArray"
    arr[381] = "DTWAIN_GetActiveDSMPath"
    arr[382] = "DTWAIN_GetActiveDSMPathA"
    arr[383] = "DTWAIN_GetActiveDSMPathW"
    arr[384] = "DTWAIN_GetActiveDSMVersionInfo"
    arr[385] = "DTWAIN_GetActiveDSMVersionInfoA"
    arr[386] = "DTWAIN_GetActiveDSMVersionInfoW"
    arr[387] = "DTWAIN_GetAlarmVolume"
    arr[388] = "DTWAIN_GetAllSourceDibs"
    arr[389] = "DTWAIN_GetAppInfo"
    arr[390] = "DTWAIN_GetAppInfoA"
    arr[391] = "DTWAIN_GetAppInfoW"
    arr[392] = "DTWAIN_GetAuthor"
    arr[393] = "DTWAIN_GetAuthorA"
    arr[394] = "DTWAIN_GetAuthorW"
    arr[395] = "DTWAIN_GetBarcodeMaxPriorities"
    arr[396] = "DTWAIN_GetBarcodeMaxRetries"
    arr[397] = "DTWAIN_GetBarcodePriorities"
    arr[398] = "DTWAIN_GetBarcodeSearchMode"
    arr[399] = "DTWAIN_GetBarcodeTimeOut"
    arr[400] = "DTWAIN_GetBatteryMinutes"
    arr[401] = "DTWAIN_GetBatteryPercent"
    arr[402] = "DTWAIN_GetBitDepth"
    arr[403] = "DTWAIN_GetBitDepthEx"
    arr[404] = "DTWAIN_GetBlankPageAutoDetection"
    arr[405] = "DTWAIN_GetBrightness"
    arr[406] = "DTWAIN_GetBrightnessEx"
    arr[407] = "DTWAIN_GetBrightnessString"
    arr[408] = "DTWAIN_GetBrightnessStringA"
    arr[409] = "DTWAIN_GetBrightnessStringW"
    arr[410] = "DTWAIN_GetBufferedTransferInfo"
    arr[411] = "DTWAIN_GetCallback"
    arr[412] = "DTWAIN_GetCallback64"
    arr[413] = "DTWAIN_GetCapArrayType"
    arr[414] = "DTWAIN_GetCapContainer"
    arr[415] = "DTWAIN_GetCapContainerEx"
    arr[416] = "DTWAIN_GetCapContainerEx2"
    arr[417] = "DTWAIN_GetCapDataType"
    arr[418] = "DTWAIN_GetCapFromName"
    arr[419] = "DTWAIN_GetCapFromNameA"
    arr[420] = "DTWAIN_GetCapFromNameW"
    arr[421] = "DTWAIN_GetCapHelp"
    arr[422] = "DTWAIN_GetCapHelpA"
    arr[423] = "DTWAIN_GetCapHelpW"
    arr[424] = "DTWAIN_GetCapLabel"
    arr[425] = "DTWAIN_GetCapLabelA"
    arr[426] = "DTWAIN_GetCapLabelW"
    arr[427] = "DTWAIN_GetCapOperations"
    arr[428] = "DTWAIN_GetCapOperationsEx"
    arr[429] = "DTWAIN_GetCapValues"
    arr[430] = "DTWAIN_GetCapValuesEx"
    arr[431] = "DTWAIN_GetCapValuesEx2"
    arr[432] = "DTWAIN_GetCaption"
    arr[433] = "DTWAIN_GetCaptionA"
    arr[434] = "DTWAIN_GetCaptionW"
    arr[435] = "DTWAIN_GetCompressionSize"
    arr[436] = "DTWAIN_GetCompressionType"
    arr[437] = "DTWAIN_GetCompressionTypeEx"
    arr[438] = "DTWAIN_GetConditionCodeString"
    arr[439] = "DTWAIN_GetConditionCodeStringA"
    arr[440] = "DTWAIN_GetConditionCodeStringW"
    arr[441] = "DTWAIN_GetConstantFromTwainName"
    arr[442] = "DTWAIN_GetConstantFromTwainNameA"
    arr[443] = "DTWAIN_GetConstantFromTwainNameW"
    arr[444] = "DTWAIN_GetContrast"
    arr[445] = "DTWAIN_GetContrastEx"
    arr[446] = "DTWAIN_GetContrastString"
    arr[447] = "DTWAIN_GetContrastStringA"
    arr[448] = "DTWAIN_GetContrastStringW"
    arr[449] = "DTWAIN_GetCountry"
    arr[450] = "DTWAIN_GetCurrentAcquiredImage"
    arr[451] = "DTWAIN_GetCurrentFileName"
    arr[452] = "DTWAIN_GetCurrentFileNameA"
    arr[453] = "DTWAIN_GetCurrentFileNameW"
    arr[454] = "DTWAIN_GetCurrentPageNum"
    arr[455] = "DTWAIN_GetCurrentRetryCount"
    arr[456] = "DTWAIN_GetCurrentTwainTriplet"
    arr[457] = "DTWAIN_GetCustomDSData"
    arr[458] = "DTWAIN_GetDSMFullName"
    arr[459] = "DTWAIN_GetDSMFullNameA"
    arr[460] = "DTWAIN_GetDSMFullNameW"
    arr[461] = "DTWAIN_GetDSMSearchOrder"
    arr[462] = "DTWAIN_GetDSMSearchOrderEx"
    arr[463] = "DTWAIN_GetDSMSearchOrderExA"
    arr[464] = "DTWAIN_GetDSMSearchOrderExW"
    arr[465] = "DTWAIN_GetDTWAINHandle"
    arr[466] = "DTWAIN_GetDeviceEvent"
    arr[467] = "DTWAIN_GetDeviceEventEx"
    arr[468] = "DTWAIN_GetDeviceEventInfo"
    arr[469] = "DTWAIN_GetDeviceNotifications"
    arr[470] = "DTWAIN_GetDeviceTimeDate"
    arr[471] = "DTWAIN_GetDeviceTimeDateA"
    arr[472] = "DTWAIN_GetDeviceTimeDateW"
    arr[473] = "DTWAIN_GetDoubleFeedDetectLength"
    arr[474] = "DTWAIN_GetDoubleFeedDetectValues"
    arr[475] = "DTWAIN_GetDuplexType"
    arr[476] = "DTWAIN_GetDuplexTypeEx"
    arr[477] = "DTWAIN_GetErrorBuffer"
    arr[478] = "DTWAIN_GetErrorBufferThreshold"
    arr[479] = "DTWAIN_GetErrorCallback"
    arr[480] = "DTWAIN_GetErrorCallback64"
    arr[481] = "DTWAIN_GetErrorString"
    arr[482] = "DTWAIN_GetErrorStringA"
    arr[483] = "DTWAIN_GetErrorStringW"
    arr[484] = "DTWAIN_GetExtCapFromName"
    arr[485] = "DTWAIN_GetExtCapFromNameA"
    arr[486] = "DTWAIN_GetExtCapFromNameW"
    arr[487] = "DTWAIN_GetExtImageInfo"
    arr[488] = "DTWAIN_GetExtImageInfoData"
    arr[489] = "DTWAIN_GetExtImageInfoDataEx"
    arr[490] = "DTWAIN_GetExtImageInfoItem"
    arr[491] = "DTWAIN_GetExtImageInfoItemEx"
    arr[492] = "DTWAIN_GetExtNameFromCap"
    arr[493] = "DTWAIN_GetExtNameFromCapA"
    arr[494] = "DTWAIN_GetExtNameFromCapW"
    arr[495] = "DTWAIN_GetFeederAlignment"
    arr[496] = "DTWAIN_GetFeederFuncs"
    arr[497] = "DTWAIN_GetFeederOrder"
    arr[498] = "DTWAIN_GetFeederWaitTime"
    arr[499] = "DTWAIN_GetFileCompressionType"
    arr[500] = "DTWAIN_GetFileSavePageCount"
    arr[501] = "DTWAIN_GetFileTypeExtensions"
    arr[502] = "DTWAIN_GetFileTypeExtensionsA"
    arr[503] = "DTWAIN_GetFileTypeExtensionsW"
    arr[504] = "DTWAIN_GetFileTypeName"
    arr[505] = "DTWAIN_GetFileTypeNameA"
    arr[506] = "DTWAIN_GetFileTypeNameW"
    arr[507] = "DTWAIN_GetHalftone"
    arr[508] = "DTWAIN_GetHalftoneA"
    arr[509] = "DTWAIN_GetHalftoneW"
    arr[510] = "DTWAIN_GetHighlight"
    arr[511] = "DTWAIN_GetHighlightString"
    arr[512] = "DTWAIN_GetHighlightStringA"
    arr[513] = "DTWAIN_GetHighlightStringW"
    arr[514] = "DTWAIN_GetImageInfo"
    arr[515] = "DTWAIN_GetImageInfoString"
    arr[516] = "DTWAIN_GetImageInfoStringA"
    arr[517] = "DTWAIN_GetImageInfoStringW"
    arr[518] = "DTWAIN_GetJobControl"
    arr[519] = "DTWAIN_GetJobControlEx"
    arr[520] = "DTWAIN_GetJpegValues"
    arr[521] = "DTWAIN_GetJpegXRValues"
    arr[522] = "DTWAIN_GetLanguage"
    arr[523] = "DTWAIN_GetLastError"
    arr[524] = "DTWAIN_GetLibraryPath"
    arr[525] = "DTWAIN_GetLibraryPathA"
    arr[526] = "DTWAIN_GetLibraryPathW"
    arr[527] = "DTWAIN_GetLightPath"
    arr[528] = "DTWAIN_GetLightPathEx"
    arr[529] = "DTWAIN_GetLightSource"
    arr[530] = "DTWAIN_GetLightSources"
    arr[531] = "DTWAIN_GetLightSourcesEx"
    arr[532] = "DTWAIN_GetLoggerCallback"
    arr[533] = "DTWAIN_GetLoggerCallbackA"
    arr[534] = "DTWAIN_GetLoggerCallbackW"
    arr[535] = "DTWAIN_GetManualDuplexCount"
    arr[536] = "DTWAIN_GetMaxAcquisitions"
    arr[537] = "DTWAIN_GetMaxBuffers"
    arr[538] = "DTWAIN_GetMaxPagesToAcquire"
    arr[539] = "DTWAIN_GetMaxRetryAttempts"
    arr[540] = "DTWAIN_GetNameFromCap"
    arr[541] = "DTWAIN_GetNameFromCapA"
    arr[542] = "DTWAIN_GetNameFromCapW"
    arr[543] = "DTWAIN_GetNoiseFilter"
    arr[544] = "DTWAIN_GetNumAcquiredImages"
    arr[545] = "DTWAIN_GetNumAcquisitions"
    arr[546] = "DTWAIN_GetOCRCapValues"
    arr[547] = "DTWAIN_GetOCRErrorString"
    arr[548] = "DTWAIN_GetOCRErrorStringA"
    arr[549] = "DTWAIN_GetOCRErrorStringW"
    arr[550] = "DTWAIN_GetOCRLastError"
    arr[551] = "DTWAIN_GetOCRMajorMinorVersion"
    arr[552] = "DTWAIN_GetOCRManufacturer"
    arr[553] = "DTWAIN_GetOCRManufacturerA"
    arr[554] = "DTWAIN_GetOCRManufacturerW"
    arr[555] = "DTWAIN_GetOCRProductFamily"
    arr[556] = "DTWAIN_GetOCRProductFamilyA"
    arr[557] = "DTWAIN_GetOCRProductFamilyW"
    arr[558] = "DTWAIN_GetOCRProductName"
    arr[559] = "DTWAIN_GetOCRProductNameA"
    arr[560] = "DTWAIN_GetOCRProductNameW"
    arr[561] = "DTWAIN_GetOCRText"
    arr[562] = "DTWAIN_GetOCRTextA"
    arr[563] = "DTWAIN_GetOCRTextInfoFloat"
    arr[564] = "DTWAIN_GetOCRTextInfoFloatEx"
    arr[565] = "DTWAIN_GetOCRTextInfoHandle"
    arr[566] = "DTWAIN_GetOCRTextInfoLong"
    arr[567] = "DTWAIN_GetOCRTextInfoLongEx"
    arr[568] = "DTWAIN_GetOCRTextW"
    arr[569] = "DTWAIN_GetOCRVersionInfo"
    arr[570] = "DTWAIN_GetOCRVersionInfoA"
    arr[571] = "DTWAIN_GetOCRVersionInfoW"
    arr[572] = "DTWAIN_GetOrientation"
    arr[573] = "DTWAIN_GetOrientationEx"
    arr[574] = "DTWAIN_GetOverscan"
    arr[575] = "DTWAIN_GetPDFTextElementFloat"
    arr[576] = "DTWAIN_GetPDFTextElementLong"
    arr[577] = "DTWAIN_GetPDFTextElementString"
    arr[578] = "DTWAIN_GetPDFTextElementStringA"
    arr[579] = "DTWAIN_GetPDFTextElementStringW"
    arr[580] = "DTWAIN_GetPDFType1FontName"
    arr[581] = "DTWAIN_GetPDFType1FontNameA"
    arr[582] = "DTWAIN_GetPDFType1FontNameW"
    arr[583] = "DTWAIN_GetPaperSize"
    arr[584] = "DTWAIN_GetPaperSizeName"
    arr[585] = "DTWAIN_GetPaperSizeNameA"
    arr[586] = "DTWAIN_GetPaperSizeNameW"
    arr[587] = "DTWAIN_GetPatchcodeMaxPriorities"
    arr[588] = "DTWAIN_GetPatchcodeMaxRetries"
    arr[589] = "DTWAIN_GetPatchcodePriorities"
    arr[590] = "DTWAIN_GetPatchcodeSearchMode"
    arr[591] = "DTWAIN_GetPatchcodeTimeOut"
    arr[592] = "DTWAIN_GetPixelFlavor"
    arr[593] = "DTWAIN_GetPixelType"
    arr[594] = "DTWAIN_GetPrinter"
    arr[595] = "DTWAIN_GetPrinterEx"
    arr[596] = "DTWAIN_GetPrinterStartNumber"
    arr[597] = "DTWAIN_GetPrinterStartNumberEx"
    arr[598] = "DTWAIN_GetPrinterStringMode"
    arr[599] = "DTWAIN_GetPrinterStringModeEx"
    arr[600] = "DTWAIN_GetPrinterStrings"
    arr[601] = "DTWAIN_GetPrinterStringsEx"
    arr[602] = "DTWAIN_GetPrinterSuffixString"
    arr[603] = "DTWAIN_GetPrinterSuffixStringA"
    arr[604] = "DTWAIN_GetPrinterSuffixStringW"
    arr[605] = "DTWAIN_GetRegisteredMsg"
    arr[606] = "DTWAIN_GetResolution"
    arr[607] = "DTWAIN_GetResolutionEx"
    arr[608] = "DTWAIN_GetResolutionString"
    arr[609] = "DTWAIN_GetResolutionStringA"
    arr[610] = "DTWAIN_GetResolutionStringW"
    arr[611] = "DTWAIN_GetResourceString"
    arr[612] = "DTWAIN_GetResourceStringA"
    arr[613] = "DTWAIN_GetResourceStringW"
    arr[614] = "DTWAIN_GetRotation"
    arr[615] = "DTWAIN_GetRotationEx"
    arr[616] = "DTWAIN_GetRotationString"
    arr[617] = "DTWAIN_GetRotationStringA"
    arr[618] = "DTWAIN_GetRotationStringW"
    arr[619] = "DTWAIN_GetSaveFileName"
    arr[620] = "DTWAIN_GetSaveFileNameA"
    arr[621] = "DTWAIN_GetSaveFileNameW"
    arr[622] = "DTWAIN_GetSessionDetails"
    arr[623] = "DTWAIN_GetSessionDetailsA"
    arr[624] = "DTWAIN_GetSessionDetailsW"
    arr[625] = "DTWAIN_GetShadow"
    arr[626] = "DTWAIN_GetShadowString"
    arr[627] = "DTWAIN_GetShadowStringA"
    arr[628] = "DTWAIN_GetShadowStringW"
    arr[629] = "DTWAIN_GetShortVersionString"
    arr[630] = "DTWAIN_GetShortVersionStringA"
    arr[631] = "DTWAIN_GetShortVersionStringW"
    arr[632] = "DTWAIN_GetSourceAcquisitions"
    arr[633] = "DTWAIN_GetSourceDetails"
    arr[634] = "DTWAIN_GetSourceDetailsA"
    arr[635] = "DTWAIN_GetSourceDetailsW"
    arr[636] = "DTWAIN_GetSourceID"
    arr[637] = "DTWAIN_GetSourceIDEx"
    arr[638] = "DTWAIN_GetSourceManufacturer"
    arr[639] = "DTWAIN_GetSourceManufacturerA"
    arr[640] = "DTWAIN_GetSourceManufacturerW"
    arr[641] = "DTWAIN_GetSourceProductFamily"
    arr[642] = "DTWAIN_GetSourceProductFamilyA"
    arr[643] = "DTWAIN_GetSourceProductFamilyW"
    arr[644] = "DTWAIN_GetSourceProductName"
    arr[645] = "DTWAIN_GetSourceProductNameA"
    arr[646] = "DTWAIN_GetSourceProductNameW"
    arr[647] = "DTWAIN_GetSourceUnit"
    arr[648] = "DTWAIN_GetSourceUnitEx"
    arr[649] = "DTWAIN_GetSourceVersionInfo"
    arr[650] = "DTWAIN_GetSourceVersionInfoA"
    arr[651] = "DTWAIN_GetSourceVersionInfoW"
    arr[652] = "DTWAIN_GetSourceVersionNumber"
    arr[653] = "DTWAIN_GetStaticLibVersion"
    arr[654] = "DTWAIN_GetTempFileDirectory"
    arr[655] = "DTWAIN_GetTempFileDirectoryA"
    arr[656] = "DTWAIN_GetTempFileDirectoryW"
    arr[657] = "DTWAIN_GetThreshold"
    arr[658] = "DTWAIN_GetThresholdString"
    arr[659] = "DTWAIN_GetThresholdStringA"
    arr[660] = "DTWAIN_GetThresholdStringW"
    arr[661] = "DTWAIN_GetTimeDate"
    arr[662] = "DTWAIN_GetTimeDateA"
    arr[663] = "DTWAIN_GetTimeDateW"
    arr[664] = "DTWAIN_GetTwainAppID"
    arr[665] = "DTWAIN_GetTwainAppIDEx"
    arr[666] = "DTWAIN_GetTwainAvailability"
    arr[667] = "DTWAIN_GetTwainAvailabilityEx"
    arr[668] = "DTWAIN_GetTwainAvailabilityExA"
    arr[669] = "DTWAIN_GetTwainAvailabilityExW"
    arr[670] = "DTWAIN_GetTwainHwnd"
    arr[671] = "DTWAIN_GetTwainMode"
    arr[672] = "DTWAIN_GetTwainNameFromConstant"
    arr[673] = "DTWAIN_GetTwainNameFromConstantA"
    arr[674] = "DTWAIN_GetTwainNameFromConstantEx"
    arr[675] = "DTWAIN_GetTwainNameFromConstantExA"
    arr[676] = "DTWAIN_GetTwainNameFromConstantExW"
    arr[677] = "DTWAIN_GetTwainNameFromConstantW"
    arr[678] = "DTWAIN_GetTwainTimeout"
    arr[679] = "DTWAIN_GetVersion"
    arr[680] = "DTWAIN_GetVersionCopyright"
    arr[681] = "DTWAIN_GetVersionCopyrightA"
    arr[682] = "DTWAIN_GetVersionCopyrightW"
    arr[683] = "DTWAIN_GetVersionEx"
    arr[684] = "DTWAIN_GetVersionInfo"
    arr[685] = "DTWAIN_GetVersionInfoA"
    arr[686] = "DTWAIN_GetVersionInfoW"
    arr[687] = "DTWAIN_GetVersionString"
    arr[688] = "DTWAIN_GetVersionStringA"
    arr[689] = "DTWAIN_GetVersionStringW"
    arr[690] = "DTWAIN_GetWindowsVersionInfo"
    arr[691] = "DTWAIN_GetWindowsVersionInfoA"
    arr[692] = "DTWAIN_GetWindowsVersionInfoW"
    arr[693] = "DTWAIN_GetXResolution"
    arr[694] = "DTWAIN_GetXResolutionString"
    arr[695] = "DTWAIN_GetXResolutionStringA"
    arr[696] = "DTWAIN_GetXResolutionStringW"
    arr[697] = "DTWAIN_GetYResolution"
    arr[698] = "DTWAIN_GetYResolutionString"
    arr[699] = "DTWAIN_GetYResolutionStringA"
    arr[700] = "DTWAIN_GetYResolutionStringW"
    arr[701] = "DTWAIN_InitExtImageInfo"
    arr[702] = "DTWAIN_InitImageFileAppend"
    arr[703] = "DTWAIN_InitImageFileAppendA"
    arr[704] = "DTWAIN_InitImageFileAppendW"
    arr[705] = "DTWAIN_InitOCRInterface"
    arr[706] = "DTWAIN_IsAcquiring"
    arr[707] = "DTWAIN_IsAudioXferSupported"
    arr[708] = "DTWAIN_IsAutoBorderDetectEnabled"
    arr[709] = "DTWAIN_IsAutoBorderDetectSupported"
    arr[710] = "DTWAIN_IsAutoBrightEnabled"
    arr[711] = "DTWAIN_IsAutoBrightSupported"
    arr[712] = "DTWAIN_IsAutoDeskewEnabled"
    arr[713] = "DTWAIN_IsAutoDeskewSupported"
    arr[714] = "DTWAIN_IsAutoFeedEnabled"
    arr[715] = "DTWAIN_IsAutoFeedSupported"
    arr[716] = "DTWAIN_IsAutoRotateEnabled"
    arr[717] = "DTWAIN_IsAutoRotateSupported"
    arr[718] = "DTWAIN_IsAutoScanEnabled"
    arr[719] = "DTWAIN_IsAutomaticSenseMediumEnabled"
    arr[720] = "DTWAIN_IsAutomaticSenseMediumSupported"
    arr[721] = "DTWAIN_IsBarcodeCapsSupported"
    arr[722] = "DTWAIN_IsBarcodeDetectionEnabled"
    arr[723] = "DTWAIN_IsBarcodeSupported"
    arr[724] = "DTWAIN_IsBlankPageDetectionOn"
    arr[725] = "DTWAIN_IsBufferedTileModeOn"
    arr[726] = "DTWAIN_IsBufferedTileModeSupported"
    arr[727] = "DTWAIN_IsCapSupported"
    arr[728] = "DTWAIN_IsCompressionSupported"
    arr[729] = "DTWAIN_IsCustomDSDataSupported"
    arr[730] = "DTWAIN_IsDIBBlank"
    arr[731] = "DTWAIN_IsDIBBlankString"
    arr[732] = "DTWAIN_IsDIBBlankStringA"
    arr[733] = "DTWAIN_IsDIBBlankStringW"
    arr[734] = "DTWAIN_IsDeviceEventSupported"
    arr[735] = "DTWAIN_IsDeviceOnLine"
    arr[736] = "DTWAIN_IsDoubleFeedDetectLengthSupported"
    arr[737] = "DTWAIN_IsDoubleFeedDetectSupported"
    arr[738] = "DTWAIN_IsDuplexEnabled"
    arr[739] = "DTWAIN_IsDuplexSupported"
    arr[740] = "DTWAIN_IsExtImageInfoSupported"
    arr[741] = "DTWAIN_IsFeederEnabled"
    arr[742] = "DTWAIN_IsFeederLoaded"
    arr[743] = "DTWAIN_IsFeederSensitive"
    arr[744] = "DTWAIN_IsFeederSupported"
    arr[745] = "DTWAIN_IsFileSystemSupported"
    arr[746] = "DTWAIN_IsFileXferSupported"
    arr[747] = "DTWAIN_IsGetMessageLoopDetectionOn"
    arr[748] = "DTWAIN_IsGetMessageLoopEnabled"
    arr[749] = "DTWAIN_IsIAFieldALastPageSupported"
    arr[750] = "DTWAIN_IsIAFieldALevelSupported"
    arr[751] = "DTWAIN_IsIAFieldAPrintFormatSupported"
    arr[752] = "DTWAIN_IsIAFieldAValueSupported"
    arr[753] = "DTWAIN_IsIAFieldBLastPageSupported"
    arr[754] = "DTWAIN_IsIAFieldBLevelSupported"
    arr[755] = "DTWAIN_IsIAFieldBPrintFormatSupported"
    arr[756] = "DTWAIN_IsIAFieldBValueSupported"
    arr[757] = "DTWAIN_IsIAFieldCLastPageSupported"
    arr[758] = "DTWAIN_IsIAFieldCLevelSupported"
    arr[759] = "DTWAIN_IsIAFieldCPrintFormatSupported"
    arr[760] = "DTWAIN_IsIAFieldCValueSupported"
    arr[761] = "DTWAIN_IsIAFieldDLastPageSupported"
    arr[762] = "DTWAIN_IsIAFieldDLevelSupported"
    arr[763] = "DTWAIN_IsIAFieldDPrintFormatSupported"
    arr[764] = "DTWAIN_IsIAFieldDValueSupported"
    arr[765] = "DTWAIN_IsIAFieldELastPageSupported"
    arr[766] = "DTWAIN_IsIAFieldELevelSupported"
    arr[767] = "DTWAIN_IsIAFieldEPrintFormatSupported"
    arr[768] = "DTWAIN_IsIAFieldEValueSupported"
    arr[769] = "DTWAIN_IsImageAddressingSupported"
    arr[770] = "DTWAIN_IsIndicatorEnabled"
    arr[771] = "DTWAIN_IsIndicatorSupported"
    arr[772] = "DTWAIN_IsInitialized"
    arr[773] = "DTWAIN_IsJobControlSupported"
    arr[774] = "DTWAIN_IsLampEnabled"
    arr[775] = "DTWAIN_IsLampSupported"
    arr[776] = "DTWAIN_IsLightPathSupported"
    arr[777] = "DTWAIN_IsLightSourceSupported"
    arr[778] = "DTWAIN_IsMaxBuffersSupported"
    arr[779] = "DTWAIN_IsMemFileXferSupported"
    arr[780] = "DTWAIN_IsMsgNotifyEnabled"
    arr[781] = "DTWAIN_IsNotifyTripletsEnabled"
    arr[782] = "DTWAIN_IsOCREngineActivated"
    arr[783] = "DTWAIN_IsOpenSourcesOnSelect"
    arr[784] = "DTWAIN_IsOrientationSupported"
    arr[785] = "DTWAIN_IsOverscanSupported"
    arr[786] = "DTWAIN_IsPaperDetectable"
    arr[787] = "DTWAIN_IsPaperSizeSupported"
    arr[788] = "DTWAIN_IsPatchcodeCapsSupported"
    arr[789] = "DTWAIN_IsPatchcodeDetectionEnabled"
    arr[790] = "DTWAIN_IsPatchcodeSupported"
    arr[791] = "DTWAIN_IsPeekMessageLoopEnabled"
    arr[792] = "DTWAIN_IsPixelTypeSupported"
    arr[793] = "DTWAIN_IsPrinterEnabled"
    arr[794] = "DTWAIN_IsPrinterSupported"
    arr[795] = "DTWAIN_IsRotationSupported"
    arr[796] = "DTWAIN_IsSessionEnabled"
    arr[797] = "DTWAIN_IsSkipImageInfoError"
    arr[798] = "DTWAIN_IsSourceAcquiring"
    arr[799] = "DTWAIN_IsSourceAcquiringEx"
    arr[800] = "DTWAIN_IsSourceInUIOnlyMode"
    arr[801] = "DTWAIN_IsSourceOpen"
    arr[802] = "DTWAIN_IsSourceSelected"
    arr[803] = "DTWAIN_IsSourceValid"
    arr[804] = "DTWAIN_IsThumbnailEnabled"
    arr[805] = "DTWAIN_IsThumbnailSupported"
    arr[806] = "DTWAIN_IsTwainAvailable"
    arr[807] = "DTWAIN_IsTwainAvailableEx"
    arr[808] = "DTWAIN_IsTwainAvailableExA"
    arr[809] = "DTWAIN_IsTwainAvailableExW"
    arr[810] = "DTWAIN_IsUIControllable"
    arr[811] = "DTWAIN_IsUIEnabled"
    arr[812] = "DTWAIN_IsUIOnlySupported"
    arr[813] = "DTWAIN_LoadCustomStringResources"
    arr[814] = "DTWAIN_LoadCustomStringResourcesA"
    arr[815] = "DTWAIN_LoadCustomStringResourcesEx"
    arr[816] = "DTWAIN_LoadCustomStringResourcesExA"
    arr[817] = "DTWAIN_LoadCustomStringResourcesExW"
    arr[818] = "DTWAIN_LoadCustomStringResourcesW"
    arr[819] = "DTWAIN_LoadLanguageResource"
    arr[820] = "DTWAIN_LockMemory"
    arr[821] = "DTWAIN_LockMemoryEx"
    arr[822] = "DTWAIN_LogMessage"
    arr[823] = "DTWAIN_LogMessageA"
    arr[824] = "DTWAIN_LogMessageW"
    arr[825] = "DTWAIN_MakeRGB"
    arr[826] = "DTWAIN_OpenSource"
    arr[827] = "DTWAIN_OpenSourcesOnSelect"
    arr[828] = "DTWAIN_RangeCreate"
    arr[829] = "DTWAIN_RangeCreateFromCap"
    arr[830] = "DTWAIN_RangeDestroy"
    arr[831] = "DTWAIN_RangeExpand"
    arr[832] = "DTWAIN_RangeExpandEx"
    arr[833] = "DTWAIN_RangeGetAll"
    arr[834] = "DTWAIN_RangeGetAllFloat"
    arr[835] = "DTWAIN_RangeGetAllFloatString"
    arr[836] = "DTWAIN_RangeGetAllFloatStringA"
    arr[837] = "DTWAIN_RangeGetAllFloatStringW"
    arr[838] = "DTWAIN_RangeGetAllLong"
    arr[839] = "DTWAIN_RangeGetCount"
    arr[840] = "DTWAIN_RangeGetExpValue"
    arr[841] = "DTWAIN_RangeGetExpValueFloat"
    arr[842] = "DTWAIN_RangeGetExpValueFloatString"
    arr[843] = "DTWAIN_RangeGetExpValueFloatStringA"
    arr[844] = "DTWAIN_RangeGetExpValueFloatStringW"
    arr[845] = "DTWAIN_RangeGetExpValueLong"
    arr[846] = "DTWAIN_RangeGetNearestValue"
    arr[847] = "DTWAIN_RangeGetNearestValueFloat"
    arr[848] = "DTWAIN_RangeGetNearestValueFloatString"
    arr[849] = "DTWAIN_RangeGetNearestValueFloatStringA"
    arr[850] = "DTWAIN_RangeGetNearestValueFloatStringW"
    arr[851] = "DTWAIN_RangeGetNearestValueLong"
    arr[852] = "DTWAIN_RangeGetPos"
    arr[853] = "DTWAIN_RangeGetPosFloat"
    arr[854] = "DTWAIN_RangeGetPosFloatString"
    arr[855] = "DTWAIN_RangeGetPosFloatStringA"
    arr[856] = "DTWAIN_RangeGetPosFloatStringW"
    arr[857] = "DTWAIN_RangeGetPosLong"
    arr[858] = "DTWAIN_RangeGetValue"
    arr[859] = "DTWAIN_RangeGetValueFloat"
    arr[860] = "DTWAIN_RangeGetValueFloatString"
    arr[861] = "DTWAIN_RangeGetValueFloatStringA"
    arr[862] = "DTWAIN_RangeGetValueFloatStringW"
    arr[863] = "DTWAIN_RangeGetValueLong"
    arr[864] = "DTWAIN_RangeIsValid"
    arr[865] = "DTWAIN_RangeSetAll"
    arr[866] = "DTWAIN_RangeSetAllFloat"
    arr[867] = "DTWAIN_RangeSetAllFloatString"
    arr[868] = "DTWAIN_RangeSetAllFloatStringA"
    arr[869] = "DTWAIN_RangeSetAllFloatStringW"
    arr[870] = "DTWAIN_RangeSetAllLong"
    arr[871] = "DTWAIN_RangeSetValue"
    arr[872] = "DTWAIN_RangeSetValueFloat"
    arr[873] = "DTWAIN_RangeSetValueFloatString"
    arr[874] = "DTWAIN_RangeSetValueFloatStringA"
    arr[875] = "DTWAIN_RangeSetValueFloatStringW"
    arr[876] = "DTWAIN_RangeSetValueLong"
    arr[877] = "DTWAIN_RemovePDFTextElement"
    arr[878] = "DTWAIN_ResetPDFTextElement"
    arr[879] = "DTWAIN_RewindPage"
    arr[880] = "DTWAIN_RotateImage"
    arr[881] = "DTWAIN_RotateImageString"
    arr[882] = "DTWAIN_RotateImageStringA"
    arr[883] = "DTWAIN_RotateImageStringW"
    arr[884] = "DTWAIN_SelectDefaultOCREngine"
    arr[885] = "DTWAIN_SelectDefaultSource"
    arr[886] = "DTWAIN_SelectDefaultSourceWithOpen"
    arr[887] = "DTWAIN_SelectOCREngine"
    arr[888] = "DTWAIN_SelectOCREngine2"
    arr[889] = "DTWAIN_SelectOCREngine2A"
    arr[890] = "DTWAIN_SelectOCREngine2Ex"
    arr[891] = "DTWAIN_SelectOCREngine2ExA"
    arr[892] = "DTWAIN_SelectOCREngine2ExW"
    arr[893] = "DTWAIN_SelectOCREngine2W"
    arr[894] = "DTWAIN_SelectOCREngineByName"
    arr[895] = "DTWAIN_SelectOCREngineByNameA"
    arr[896] = "DTWAIN_SelectOCREngineByNameW"
    arr[897] = "DTWAIN_SelectSource"
    arr[898] = "DTWAIN_SelectSource2"
    arr[899] = "DTWAIN_SelectSource2A"
    arr[900] = "DTWAIN_SelectSource2Ex"
    arr[901] = "DTWAIN_SelectSource2ExA"
    arr[902] = "DTWAIN_SelectSource2ExW"
    arr[903] = "DTWAIN_SelectSource2W"
    arr[904] = "DTWAIN_SelectSourceByName"
    arr[905] = "DTWAIN_SelectSourceByNameA"
    arr[906] = "DTWAIN_SelectSourceByNameW"
    arr[907] = "DTWAIN_SelectSourceByNameWithOpen"
    arr[908] = "DTWAIN_SelectSourceByNameWithOpenA"
    arr[909] = "DTWAIN_SelectSourceByNameWithOpenW"
    arr[910] = "DTWAIN_SelectSourceWithOpen"
    arr[911] = "DTWAIN_SetAcquireArea"
    arr[912] = "DTWAIN_SetAcquireArea2"
    arr[913] = "DTWAIN_SetAcquireArea2String"
    arr[914] = "DTWAIN_SetAcquireArea2StringA"
    arr[915] = "DTWAIN_SetAcquireArea2StringW"
    arr[916] = "DTWAIN_SetAcquireImageNegative"
    arr[917] = "DTWAIN_SetAcquireImageScale"
    arr[918] = "DTWAIN_SetAcquireImageScaleString"
    arr[919] = "DTWAIN_SetAcquireImageScaleStringA"
    arr[920] = "DTWAIN_SetAcquireImageScaleStringW"
    arr[921] = "DTWAIN_SetAcquireStripBuffer"
    arr[922] = "DTWAIN_SetAcquireStripSize"
    arr[923] = "DTWAIN_SetAlarmVolume"
    arr[924] = "DTWAIN_SetAlarms"
    arr[925] = "DTWAIN_SetAllCapsToDefault"
    arr[926] = "DTWAIN_SetAppInfo"
    arr[927] = "DTWAIN_SetAppInfoA"
    arr[928] = "DTWAIN_SetAppInfoW"
    arr[929] = "DTWAIN_SetAuthor"
    arr[930] = "DTWAIN_SetAuthorA"
    arr[931] = "DTWAIN_SetAuthorW"
    arr[932] = "DTWAIN_SetAvailablePrinters"
    arr[933] = "DTWAIN_SetAvailablePrintersArray"
    arr[934] = "DTWAIN_SetBarcodeMaxPriorities"
    arr[935] = "DTWAIN_SetBarcodeMaxRetries"
    arr[936] = "DTWAIN_SetBarcodePriorities"
    arr[937] = "DTWAIN_SetBarcodeSearchMode"
    arr[938] = "DTWAIN_SetBarcodeTimeOut"
    arr[939] = "DTWAIN_SetBitDepth"
    arr[940] = "DTWAIN_SetBlankPageDetection"
    arr[941] = "DTWAIN_SetBlankPageDetectionEx"
    arr[942] = "DTWAIN_SetBlankPageDetectionExString"
    arr[943] = "DTWAIN_SetBlankPageDetectionExStringA"
    arr[944] = "DTWAIN_SetBlankPageDetectionExStringW"
    arr[945] = "DTWAIN_SetBlankPageDetectionString"
    arr[946] = "DTWAIN_SetBlankPageDetectionStringA"
    arr[947] = "DTWAIN_SetBlankPageDetectionStringW"
    arr[948] = "DTWAIN_SetBrightness"
    arr[949] = "DTWAIN_SetBrightnessString"
    arr[950] = "DTWAIN_SetBrightnessStringA"
    arr[951] = "DTWAIN_SetBrightnessStringW"
    arr[952] = "DTWAIN_SetBufferedTileMode"
    arr[953] = "DTWAIN_SetCallback"
    arr[954] = "DTWAIN_SetCallback64"
    arr[955] = "DTWAIN_SetCamera"
    arr[956] = "DTWAIN_SetCameraA"
    arr[957] = "DTWAIN_SetCameraW"
    arr[958] = "DTWAIN_SetCapValues"
    arr[959] = "DTWAIN_SetCapValuesEx"
    arr[960] = "DTWAIN_SetCapValuesEx2"
    arr[961] = "DTWAIN_SetCaption"
    arr[962] = "DTWAIN_SetCaptionA"
    arr[963] = "DTWAIN_SetCaptionW"
    arr[964] = "DTWAIN_SetCompressionType"
    arr[965] = "DTWAIN_SetContrast"
    arr[966] = "DTWAIN_SetContrastString"
    arr[967] = "DTWAIN_SetContrastStringA"
    arr[968] = "DTWAIN_SetContrastStringW"
    arr[969] = "DTWAIN_SetCountry"
    arr[970] = "DTWAIN_SetCurrentRetryCount"
    arr[971] = "DTWAIN_SetCustomDSData"
    arr[972] = "DTWAIN_SetDSMSearchOrder"
    arr[973] = "DTWAIN_SetDSMSearchOrderEx"
    arr[974] = "DTWAIN_SetDSMSearchOrderExA"
    arr[975] = "DTWAIN_SetDSMSearchOrderExW"
    arr[976] = "DTWAIN_SetDefaultSource"
    arr[977] = "DTWAIN_SetDeviceNotifications"
    arr[978] = "DTWAIN_SetDeviceTimeDate"
    arr[979] = "DTWAIN_SetDeviceTimeDateA"
    arr[980] = "DTWAIN_SetDeviceTimeDateW"
    arr[981] = "DTWAIN_SetDoubleFeedDetectLength"
    arr[982] = "DTWAIN_SetDoubleFeedDetectLengthString"
    arr[983] = "DTWAIN_SetDoubleFeedDetectLengthStringA"
    arr[984] = "DTWAIN_SetDoubleFeedDetectLengthStringW"
    arr[985] = "DTWAIN_SetDoubleFeedDetectValues"
    arr[986] = "DTWAIN_SetDoublePageCountOnDuplex"
    arr[987] = "DTWAIN_SetEOJDetectValue"
    arr[988] = "DTWAIN_SetErrorBufferThreshold"
    arr[989] = "DTWAIN_SetErrorCallback"
    arr[990] = "DTWAIN_SetErrorCallback64"
    arr[991] = "DTWAIN_SetFeederAlignment"
    arr[992] = "DTWAIN_SetFeederOrder"
    arr[993] = "DTWAIN_SetFeederWaitTime"
    arr[994] = "DTWAIN_SetFileAutoIncrement"
    arr[995] = "DTWAIN_SetFileCompressionType"
    arr[996] = "DTWAIN_SetFileSavePos"
    arr[997] = "DTWAIN_SetFileSavePosA"
    arr[998] = "DTWAIN_SetFileSavePosW"
    arr[999] = "DTWAIN_SetFileXferFormat"
    arr[1000] = "DTWAIN_SetHalftone"
    arr[1001] = "DTWAIN_SetHalftoneA"
    arr[1002] = "DTWAIN_SetHalftoneW"
    arr[1003] = "DTWAIN_SetHighlight"
    arr[1004] = "DTWAIN_SetHighlightString"
    arr[1005] = "DTWAIN_SetHighlightStringA"
    arr[1006] = "DTWAIN_SetHighlightStringW"
    arr[1007] = "DTWAIN_SetJobControl"
    arr[1008] = "DTWAIN_SetJpegValues"
    arr[1009] = "DTWAIN_SetJpegXRValues"
    arr[1010] = "DTWAIN_SetLanguage"
    arr[1011] = "DTWAIN_SetLastError"
    arr[1012] = "DTWAIN_SetLightPath"
    arr[1013] = "DTWAIN_SetLightPathEx"
    arr[1014] = "DTWAIN_SetLightSource"
    arr[1015] = "DTWAIN_SetLightSources"
    arr[1016] = "DTWAIN_SetLogSaveThreshold"
    arr[1017] = "DTWAIN_SetLoggerCallback"
    arr[1018] = "DTWAIN_SetLoggerCallbackA"
    arr[1019] = "DTWAIN_SetLoggerCallbackW"
    arr[1020] = "DTWAIN_SetManualDuplexMode"
    arr[1021] = "DTWAIN_SetMaxAcquisitions"
    arr[1022] = "DTWAIN_SetMaxBuffers"
    arr[1023] = "DTWAIN_SetMaxRetryAttempts"
    arr[1024] = "DTWAIN_SetMultipageScanMode"
    arr[1025] = "DTWAIN_SetNoiseFilter"
    arr[1026] = "DTWAIN_SetOCRCapValues"
    arr[1027] = "DTWAIN_SetOrientation"
    arr[1028] = "DTWAIN_SetOverscan"
    arr[1029] = "DTWAIN_SetPDFAESEncryption"
    arr[1030] = "DTWAIN_SetPDFASCIICompression"
    arr[1031] = "DTWAIN_SetPDFAuthor"
    arr[1032] = "DTWAIN_SetPDFAuthorA"
    arr[1033] = "DTWAIN_SetPDFAuthorW"
    arr[1034] = "DTWAIN_SetPDFCompression"
    arr[1035] = "DTWAIN_SetPDFCreator"
    arr[1036] = "DTWAIN_SetPDFCreatorA"
    arr[1037] = "DTWAIN_SetPDFCreatorW"
    arr[1038] = "DTWAIN_SetPDFEncryption"
    arr[1039] = "DTWAIN_SetPDFEncryptionA"
    arr[1040] = "DTWAIN_SetPDFEncryptionW"
    arr[1041] = "DTWAIN_SetPDFJpegQuality"
    arr[1042] = "DTWAIN_SetPDFKeywords"
    arr[1043] = "DTWAIN_SetPDFKeywordsA"
    arr[1044] = "DTWAIN_SetPDFKeywordsW"
    arr[1045] = "DTWAIN_SetPDFOCRConversion"
    arr[1046] = "DTWAIN_SetPDFOCRMode"
    arr[1047] = "DTWAIN_SetPDFOrientation"
    arr[1048] = "DTWAIN_SetPDFPageScale"
    arr[1049] = "DTWAIN_SetPDFPageScaleString"
    arr[1050] = "DTWAIN_SetPDFPageScaleStringA"
    arr[1051] = "DTWAIN_SetPDFPageScaleStringW"
    arr[1052] = "DTWAIN_SetPDFPageSize"
    arr[1053] = "DTWAIN_SetPDFPageSizeString"
    arr[1054] = "DTWAIN_SetPDFPageSizeStringA"
    arr[1055] = "DTWAIN_SetPDFPageSizeStringW"
    arr[1056] = "DTWAIN_SetPDFPolarity"
    arr[1057] = "DTWAIN_SetPDFProducer"
    arr[1058] = "DTWAIN_SetPDFProducerA"
    arr[1059] = "DTWAIN_SetPDFProducerW"
    arr[1060] = "DTWAIN_SetPDFSubject"
    arr[1061] = "DTWAIN_SetPDFSubjectA"
    arr[1062] = "DTWAIN_SetPDFSubjectW"
    arr[1063] = "DTWAIN_SetPDFTextElementFloat"
    arr[1064] = "DTWAIN_SetPDFTextElementFloatString"
    arr[1065] = "DTWAIN_SetPDFTextElementFloatStringA"
    arr[1066] = "DTWAIN_SetPDFTextElementFloatStringW"
    arr[1067] = "DTWAIN_SetPDFTextElementLong"
    arr[1068] = "DTWAIN_SetPDFTextElementString"
    arr[1069] = "DTWAIN_SetPDFTextElementStringA"
    arr[1070] = "DTWAIN_SetPDFTextElementStringW"
    arr[1071] = "DTWAIN_SetPDFTitle"
    arr[1072] = "DTWAIN_SetPDFTitleA"
    arr[1073] = "DTWAIN_SetPDFTitleW"
    arr[1074] = "DTWAIN_SetPaperSize"
    arr[1075] = "DTWAIN_SetPatchcodeMaxPriorities"
    arr[1076] = "DTWAIN_SetPatchcodeMaxRetries"
    arr[1077] = "DTWAIN_SetPatchcodePriorities"
    arr[1078] = "DTWAIN_SetPatchcodeSearchMode"
    arr[1079] = "DTWAIN_SetPatchcodeTimeOut"
    arr[1080] = "DTWAIN_SetPixelFlavor"
    arr[1081] = "DTWAIN_SetPixelType"
    arr[1082] = "DTWAIN_SetPostScriptTitle"
    arr[1083] = "DTWAIN_SetPostScriptTitleA"
    arr[1084] = "DTWAIN_SetPostScriptTitleW"
    arr[1085] = "DTWAIN_SetPostScriptType"
    arr[1086] = "DTWAIN_SetPrinter"
    arr[1087] = "DTWAIN_SetPrinterEx"
    arr[1088] = "DTWAIN_SetPrinterStartNumber"
    arr[1089] = "DTWAIN_SetPrinterStringMode"
    arr[1090] = "DTWAIN_SetPrinterStrings"
    arr[1091] = "DTWAIN_SetPrinterSuffixString"
    arr[1092] = "DTWAIN_SetPrinterSuffixStringA"
    arr[1093] = "DTWAIN_SetPrinterSuffixStringW"
    arr[1094] = "DTWAIN_SetQueryCapSupport"
    arr[1095] = "DTWAIN_SetResolution"
    arr[1096] = "DTWAIN_SetResolutionString"
    arr[1097] = "DTWAIN_SetResolutionStringA"
    arr[1098] = "DTWAIN_SetResolutionStringW"
    arr[1099] = "DTWAIN_SetResourcePath"
    arr[1100] = "DTWAIN_SetResourcePathA"
    arr[1101] = "DTWAIN_SetResourcePathW"
    arr[1102] = "DTWAIN_SetRotation"
    arr[1103] = "DTWAIN_SetRotationString"
    arr[1104] = "DTWAIN_SetRotationStringA"
    arr[1105] = "DTWAIN_SetRotationStringW"
    arr[1106] = "DTWAIN_SetSaveFileName"
    arr[1107] = "DTWAIN_SetSaveFileNameA"
    arr[1108] = "DTWAIN_SetSaveFileNameW"
    arr[1109] = "DTWAIN_SetShadow"
    arr[1110] = "DTWAIN_SetShadowString"
    arr[1111] = "DTWAIN_SetShadowStringA"
    arr[1112] = "DTWAIN_SetShadowStringW"
    arr[1113] = "DTWAIN_SetSourceUnit"
    arr[1114] = "DTWAIN_SetTIFFCompressType"
    arr[1115] = "DTWAIN_SetTIFFInvert"
    arr[1116] = "DTWAIN_SetTempFileDirectory"
    arr[1117] = "DTWAIN_SetTempFileDirectoryA"
    arr[1118] = "DTWAIN_SetTempFileDirectoryEx"
    arr[1119] = "DTWAIN_SetTempFileDirectoryExA"
    arr[1120] = "DTWAIN_SetTempFileDirectoryExW"
    arr[1121] = "DTWAIN_SetTempFileDirectoryW"
    arr[1122] = "DTWAIN_SetThreshold"
    arr[1123] = "DTWAIN_SetThresholdString"
    arr[1124] = "DTWAIN_SetThresholdStringA"
    arr[1125] = "DTWAIN_SetThresholdStringW"
    arr[1126] = "DTWAIN_SetTwainDSM"
    arr[1127] = "DTWAIN_SetTwainLog"
    arr[1128] = "DTWAIN_SetTwainLogA"
    arr[1129] = "DTWAIN_SetTwainLogW"
    arr[1130] = "DTWAIN_SetTwainMode"
    arr[1131] = "DTWAIN_SetTwainTimeout"
    arr[1132] = "DTWAIN_SetUpdateDibProc"
    arr[1133] = "DTWAIN_SetXResolution"
    arr[1134] = "DTWAIN_SetXResolutionString"
    arr[1135] = "DTWAIN_SetXResolutionStringA"
    arr[1136] = "DTWAIN_SetXResolutionStringW"
    arr[1137] = "DTWAIN_SetYResolution"
    arr[1138] = "DTWAIN_SetYResolutionString"
    arr[1139] = "DTWAIN_SetYResolutionStringA"
    arr[1140] = "DTWAIN_SetYResolutionStringW"
    arr[1141] = "DTWAIN_ShowUIOnly"
    arr[1142] = "DTWAIN_ShutdownOCREngine"
    arr[1143] = "DTWAIN_SkipImageInfoError"
    arr[1144] = "DTWAIN_StartThread"
    arr[1145] = "DTWAIN_StartTwainSession"
    arr[1146] = "DTWAIN_StartTwainSessionA"
    arr[1147] = "DTWAIN_StartTwainSessionW"
    arr[1148] = "DTWAIN_SysDestroy"
    arr[1149] = "DTWAIN_SysInitialize"
    arr[1150] = "DTWAIN_SysInitializeEx"
    arr[1151] = "DTWAIN_SysInitializeEx2"
    arr[1152] = "DTWAIN_SysInitializeEx2A"
    arr[1153] = "DTWAIN_SysInitializeEx2W"
    arr[1154] = "DTWAIN_SysInitializeExA"
    arr[1155] = "DTWAIN_SysInitializeExW"
    arr[1156] = "DTWAIN_SysInitializeLib"
    arr[1157] = "DTWAIN_SysInitializeLibEx"
    arr[1158] = "DTWAIN_SysInitializeLibEx2"
    arr[1159] = "DTWAIN_SysInitializeLibEx2A"
    arr[1160] = "DTWAIN_SysInitializeLibEx2W"
    arr[1161] = "DTWAIN_SysInitializeLibExA"
    arr[1162] = "DTWAIN_SysInitializeLibExW"
    arr[1163] = "DTWAIN_SysInitializeNoBlocking"
    arr[1164] = "DTWAIN_TestGetCap"
    arr[1165] = "DTWAIN_UnlockMemory"
    arr[1166] = "DTWAIN_UnlockMemoryEx"
    arr[1167] = "DTWAIN_UpdateCurrentAcquiredImage"
    arr[1168] = "DTWAIN_UseMultipleThreads"
    for _, name := range arr {
        addr, err := syscall.GetProcAddress(d.Handle, name)
        if err != nil {
            return nil, fmt.Errorf("GetProcAddress(%s) failed: %w", name, err)
        }
        d.procs[name] = addr
    }
    return &DTWAIN_DLL{Path: path, Handle: d.Handle, procs: d.procs}, nil
}

func load_dll(path string) (*DTWAIN_DLL, error) {
    h, err := syscall.LoadLibrary(path)
    if err != nil {
        return nil, fmt.Errorf("LoadLibrary(%s) failed: %w", path, err)
    }
    return &DTWAIN_DLL{
        Path:   path,
        Handle: h,
        procs:  make(map[string]uintptr),
    }, nil
}

func Utf16ToString(buf []uint16) string {
    i := 0
    for i < len(buf) && buf[i] != 0 {
        i++
    }
    return string(utf16.Decode(buf[:i]))
}

func StringToUTF16(str string) uintptr {
    utf16Chars := utf16.Encode([]rune(str + "\x00")) // append null terminator
    ptr := uintptr(unsafe.Pointer(&utf16Chars[0]))
    return ptr
}

func GetNullTerminatedString(b []byte) string {
    nullIndex := bytes.IndexByte(b, 0)
    var goString string
    if nullIndex >= 0 {
        goString = string(b[:nullIndex])
    } else {
        goString = string(b)
    }
    return goString
}

func (d *DTWAIN_DLL) DTWAIN_AcquireAudioFile(Source DTWAIN_SOURCE, lpszFile uintptr, lFileFlags int32, lMaxClips int32, bShowUI int32, bCloseSource int32, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireAudioFile"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpszFile, uintptr(lFileFlags), uintptr(lMaxClips), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireAudioFileA(Source DTWAIN_SOURCE, lpszFile string, lFileFlags int32, lNumClips int32, bShowUI int32, bCloseSource int32, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireAudioFileA"]
    arg_0 := []byte(lpszFile)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(lFileFlags), uintptr(lNumClips), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireAudioFileW(Source DTWAIN_SOURCE, lpszFile uintptr, lFileFlags int32, lNumClips int32, bShowUI int32, bCloseSource int32, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireAudioFileW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpszFile, uintptr(lFileFlags), uintptr(lNumClips), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireAudioNative(Source DTWAIN_SOURCE, nMaxAudioClips int32, bShowUI int32, bCloseSource int32, pStatus *int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_AcquireAudioNative"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nMaxAudioClips), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireAudioNativeEx(Source DTWAIN_SOURCE, nMaxAudioClips int32, bShowUI int32, bCloseSource int32, Acquisitions DTWAIN_ARRAY, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireAudioNativeEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nMaxAudioClips), uintptr(bShowUI), uintptr(bCloseSource), uintptr(Acquisitions), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireBuffered(Source DTWAIN_SOURCE, PixelType int32, nMaxPages int32, bShowUI int32, bCloseSource int32, pStatus *int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_AcquireBuffered"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PixelType), uintptr(nMaxPages), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireBufferedEx(Source DTWAIN_SOURCE, PixelType int32, nMaxPages int32, bShowUI int32, bCloseSource int32, Acquisitions DTWAIN_ARRAY, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireBufferedEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PixelType), uintptr(nMaxPages), uintptr(bShowUI), uintptr(bCloseSource), uintptr(Acquisitions), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireFile(Source DTWAIN_SOURCE, lpszFile uintptr, lFileType int32, lFileFlags int32, PixelType int32, lMaxPages int32, bShowUI int32, bCloseSource int32, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireFile"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpszFile, uintptr(lFileType), uintptr(lFileFlags), uintptr(PixelType), uintptr(lMaxPages), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireFileA(Source DTWAIN_SOURCE, lpszFile string, lFileType int32, lFileFlags int32, PixelType int32, lMaxPages int32, bShowUI int32, bCloseSource int32, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireFileA"]
    arg_0 := []byte(lpszFile)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(lFileType), uintptr(lFileFlags), uintptr(PixelType), uintptr(lMaxPages), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireFileEx(Source DTWAIN_SOURCE, aFileNames DTWAIN_ARRAY, lFileType int32, lFileFlags int32, PixelType int32, lMaxPages int32, bShowUI int32, bCloseSource int32, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireFileEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(aFileNames), uintptr(lFileType), uintptr(lFileFlags), uintptr(PixelType), uintptr(lMaxPages), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireFileW(Source DTWAIN_SOURCE, lpszFile uintptr, lFileType int32, lFileFlags int32, PixelType int32, lMaxPages int32, bShowUI int32, bCloseSource int32, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireFileW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpszFile, uintptr(lFileType), uintptr(lFileFlags), uintptr(PixelType), uintptr(lMaxPages), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireNative(Source DTWAIN_SOURCE, PixelType int32, nMaxPages int32, bShowUI int32, bCloseSource int32, pStatus *int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_AcquireNative"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PixelType), uintptr(nMaxPages), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireNativeEx(Source DTWAIN_SOURCE, PixelType int32, nMaxPages int32, bShowUI int32, bCloseSource int32, Acquisitions DTWAIN_ARRAY, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_AcquireNativeEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PixelType), uintptr(nMaxPages), uintptr(bShowUI), uintptr(bCloseSource), uintptr(Acquisitions), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AcquireToClipboard(Source DTWAIN_SOURCE, PixelType int32, nMaxPages int32, nTransferMode int32, bDiscardDibs int32, bShowUI int32, bCloseSource int32, pStatus *int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_AcquireToClipboard"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PixelType), uintptr(nMaxPages), uintptr(nTransferMode), uintptr(bDiscardDibs), uintptr(bShowUI), uintptr(bCloseSource), uintptr(unsafe.Pointer(pStatus)))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddExtImageInfoQuery(Source DTWAIN_SOURCE, ExtImageInfo int32) int32 {
    theProc := d.procs["DTWAIN_AddExtImageInfoQuery"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(ExtImageInfo))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFText(Source DTWAIN_SOURCE, szText uintptr, xPos int32, yPos int32, fontName uintptr, fontSize float64, colorRGB int32, renderMode int32, scaling float64, charSpacing float64, wordSpacing float64, strokeWidth float64, Flags uint32) int32 {
    theProc := d.procs["DTWAIN_AddPDFText"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szText, uintptr(xPos), uintptr(yPos), fontName, uintptr(fontSize), uintptr(colorRGB), uintptr(renderMode), uintptr(scaling), uintptr(charSpacing), uintptr(wordSpacing), uintptr(strokeWidth), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFTextA(Source DTWAIN_SOURCE, szText string, xPos int32, yPos int32, fontName string, fontSize float64, colorRGB int32, renderMode int32, scaling float64, charSpacing float64, wordSpacing float64, strokeWidth float64, Flags uint32) int32 {
    theProc := d.procs["DTWAIN_AddPDFTextA"]
    arg_0 := []byte(szText)
    arg_1 := []byte(fontName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(xPos), uintptr(yPos), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(fontSize), uintptr(colorRGB), uintptr(renderMode), uintptr(scaling), uintptr(charSpacing), uintptr(wordSpacing), uintptr(strokeWidth), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFTextElement(Source DTWAIN_SOURCE, TextElement DTWAIN_PDFTEXTELEMENT) int32 {
    theProc := d.procs["DTWAIN_AddPDFTextElement"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(TextElement))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFTextEx(Source DTWAIN_SOURCE, szText uintptr, xPos int32, yPos int32, fontName uintptr, fontSize float64, colorRGB int32, renderMode int32, scaling float64, charSpacing float64, wordSpacing float64, strokeWidth float64, rotationAngle float64, skewAngleX float64, skewAngleY float64, scalingX float64, scalingY float64, transformType int32) int32 {
    theProc := d.procs["DTWAIN_AddPDFTextEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szText, uintptr(xPos), uintptr(yPos), fontName, uintptr(fontSize), uintptr(colorRGB), uintptr(renderMode), uintptr(scaling), uintptr(charSpacing), uintptr(wordSpacing), uintptr(strokeWidth), uintptr(rotationAngle), uintptr(skewAngleX), uintptr(skewAngleY), uintptr(scalingX), uintptr(scalingY), uintptr(transformType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFTextExA(Source DTWAIN_SOURCE, szText string, xPos int32, yPos int32, fontName string, fontSize float64, colorRGB int32, renderMode int32, scaling float64, charSpacing float64, wordSpacing float64, strokeWidth float64, rotationAngle float64, skewAngleX float64, skewAngleY float64, scalingX float64, scalingY float64, transformType int32) int32 {
    theProc := d.procs["DTWAIN_AddPDFTextExA"]
    arg_0 := []byte(szText)
    arg_1 := []byte(fontName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(xPos), uintptr(yPos), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(fontSize), uintptr(colorRGB), uintptr(renderMode), uintptr(scaling), uintptr(charSpacing), uintptr(wordSpacing), uintptr(strokeWidth), uintptr(rotationAngle), uintptr(skewAngleX), uintptr(skewAngleY), uintptr(scalingX), uintptr(scalingY), uintptr(transformType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFTextExW(Source DTWAIN_SOURCE, szText uintptr, xPos int32, yPos int32, fontName uintptr, fontSize float64, colorRGB int32, renderMode int32, scaling float64, charSpacing float64, wordSpacing float64, strokeWidth float64, rotationAngle float64, skewAngleX float64, skewAngleY float64, scalingX float64, scalingY float64, transformType int32) int32 {
    theProc := d.procs["DTWAIN_AddPDFTextExW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szText, uintptr(xPos), uintptr(yPos), fontName, uintptr(fontSize), uintptr(colorRGB), uintptr(renderMode), uintptr(scaling), uintptr(charSpacing), uintptr(wordSpacing), uintptr(strokeWidth), uintptr(rotationAngle), uintptr(skewAngleX), uintptr(skewAngleY), uintptr(scalingX), uintptr(scalingY), uintptr(transformType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFTextString(Source DTWAIN_SOURCE, szText uintptr, xPos int32, yPos int32, fontName uintptr, fontSize uintptr, colorRGB int32, renderMode int32, scaling uintptr, charSpacing uintptr, wordSpacing uintptr, strokeWidth uintptr, Flags uint32) int32 {
    theProc := d.procs["DTWAIN_AddPDFTextString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szText, uintptr(xPos), uintptr(yPos), fontName, fontSize, uintptr(colorRGB), uintptr(renderMode), scaling, charSpacing, wordSpacing, strokeWidth, uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFTextStringA(Source DTWAIN_SOURCE, szText string, xPos int32, yPos int32, fontName string, fontSize string, colorRGB int32, renderMode int32, scaling string, charSpacing string, wordSpacing string, strokeWidth string, Flags uint32) int32 {
    theProc := d.procs["DTWAIN_AddPDFTextStringA"]
    arg_0 := []byte(szText)
    arg_1 := []byte(fontName)
    arg_2 := []byte(fontSize)
    arg_3 := []byte(scaling)
    arg_4 := []byte(charSpacing)
    arg_5 := []byte(wordSpacing)
    arg_6 := []byte(strokeWidth)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(xPos), uintptr(yPos), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])), uintptr(colorRGB), uintptr(renderMode), uintptr(unsafe.Pointer(&arg_3[0])), uintptr(unsafe.Pointer(&arg_4[0])), uintptr(unsafe.Pointer(&arg_5[0])), uintptr(unsafe.Pointer(&arg_6[0])), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFTextStringW(Source DTWAIN_SOURCE, szText uintptr, xPos int32, yPos int32, fontName uintptr, fontSize uintptr, colorRGB int32, renderMode int32, scaling uintptr, charSpacing uintptr, wordSpacing uintptr, strokeWidth uintptr, Flags uint32) int32 {
    theProc := d.procs["DTWAIN_AddPDFTextStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szText, uintptr(xPos), uintptr(yPos), fontName, fontSize, uintptr(colorRGB), uintptr(renderMode), scaling, charSpacing, wordSpacing, strokeWidth, uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AddPDFTextW(Source DTWAIN_SOURCE, szText uintptr, xPos int32, yPos int32, fontName uintptr, fontSize float64, colorRGB int32, renderMode int32, scaling float64, charSpacing float64, wordSpacing float64, strokeWidth float64, Flags uint32) int32 {
    theProc := d.procs["DTWAIN_AddPDFTextW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szText, uintptr(xPos), uintptr(yPos), fontName, uintptr(fontSize), uintptr(colorRGB), uintptr(renderMode), uintptr(scaling), uintptr(charSpacing), uintptr(wordSpacing), uintptr(strokeWidth), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AllocateMemory(memSize uint32) HANDLE {
    theProc := d.procs["DTWAIN_AllocateMemory"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(memSize))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AllocateMemory64(memSize uint64) HANDLE {
    theProc := d.procs["DTWAIN_AllocateMemory64"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(memSize))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AllocateMemoryEx(memSize uint32) HANDLE {
    theProc := d.procs["DTWAIN_AllocateMemoryEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(memSize))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_AppHandlesExceptions(bSet int32) int32 {
    theProc := d.procs["DTWAIN_AppHandlesExceptions"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayANSIStringToFloat(StringArray DTWAIN_ARRAY) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayANSIStringToFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(StringArray))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAdd(pArray DTWAIN_ARRAY, pVariant LPVOID) int32 {
    theProc := d.procs["DTWAIN_ArrayAdd"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(pVariant))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddANSIString(pArray DTWAIN_ARRAY, Val string) int32 {
    theProc := d.procs["DTWAIN_ArrayAddANSIString"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddANSIStringN(pArray DTWAIN_ARRAY, Val string, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddANSIStringN"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFloat(pArray DTWAIN_ARRAY, Val float64) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFloatN(pArray DTWAIN_ARRAY, Val float64, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFloatN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFloatString(pArray DTWAIN_ARRAY, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFloatStringA(pArray DTWAIN_ARRAY, Val string) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFloatStringA"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFloatStringN(pArray DTWAIN_ARRAY, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFloatStringN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFloatStringNA(pArray DTWAIN_ARRAY, Val string, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFloatStringNA"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFloatStringNW(pArray DTWAIN_ARRAY, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFloatStringNW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFloatStringW(pArray DTWAIN_ARRAY, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFrame(pArray DTWAIN_ARRAY, frame DTWAIN_FRAME) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFrame"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(frame))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddFrameN(pArray DTWAIN_ARRAY, frame DTWAIN_FRAME, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddFrameN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(frame), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddLong(pArray DTWAIN_ARRAY, Val int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddLong64(pArray DTWAIN_ARRAY, Val int64) int32 {
    theProc := d.procs["DTWAIN_ArrayAddLong64"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddLong64N(pArray DTWAIN_ARRAY, Val int64, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddLong64N"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddLongN(pArray DTWAIN_ARRAY, Val int32, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddLongN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddN(pArray DTWAIN_ARRAY, pVariant LPVOID, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(pVariant), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddString(pArray DTWAIN_ARRAY, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayAddString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddStringA(pArray DTWAIN_ARRAY, Val string) int32 {
    theProc := d.procs["DTWAIN_ArrayAddStringA"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddStringN(pArray DTWAIN_ARRAY, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddStringN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddStringNA(pArray DTWAIN_ARRAY, Val string, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddStringNA"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddStringNW(pArray DTWAIN_ARRAY, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddStringNW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddStringW(pArray DTWAIN_ARRAY, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayAddStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddWideString(pArray DTWAIN_ARRAY, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayAddWideString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayAddWideStringN(pArray DTWAIN_ARRAY, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayAddWideStringN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayConvertFix32ToFloat(Fix32Array DTWAIN_ARRAY) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayConvertFix32ToFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Fix32Array))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayConvertFloatToFix32(FloatArray DTWAIN_ARRAY) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayConvertFloatToFix32"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FloatArray))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayCopy(Source DTWAIN_ARRAY, Dest DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_ArrayCopy"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Dest))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayCreate(nEnumType int32, nInitialSize int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayCreate"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nEnumType), uintptr(nInitialSize))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayCreateCopy(Source DTWAIN_ARRAY) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayCreateCopy"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayCreateFromCap(Source DTWAIN_SOURCE, lCapType int32, lSize int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayCreateFromCap"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCapType), uintptr(lSize))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayCreateFromLong64s(pCArray *int64, nSize int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayCreateFromLong64s"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(pCArray)), uintptr(nSize))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayCreateFromLongs(pCArray *int32, nSize int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayCreateFromLongs"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(pCArray)), uintptr(nSize))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayCreateFromReals(nSize int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayCreateFromReals"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nSize))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayDestroy(pArray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_ArrayDestroy"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayDestroyFrames(FrameArray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_ArrayDestroyFrames"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayDumpToLog(pArray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_ArrayDumpToLog"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFind(pArray DTWAIN_ARRAY, pVariant LPVOID) int32 {
    theProc := d.procs["DTWAIN_ArrayFind"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(pVariant))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindANSIString(pArray DTWAIN_ARRAY, pString string) int32 {
    theProc := d.procs["DTWAIN_ArrayFindANSIString"]
    arg_0 := []byte(pString)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindFloat(pArray DTWAIN_ARRAY, Val float64, Tolerance float64) int32 {
    theProc := d.procs["DTWAIN_ArrayFindFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val), uintptr(Tolerance))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindFloatString(pArray DTWAIN_ARRAY, Val uintptr, Tolerance uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayFindFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val, Tolerance)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindFloatStringA(pArray DTWAIN_ARRAY, Val string, Tolerance string) int32 {
    theProc := d.procs["DTWAIN_ArrayFindFloatStringA"]
    arg_0 := []byte(Val)
    arg_1 := []byte(Tolerance)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindFloatStringW(pArray DTWAIN_ARRAY, Val uintptr, Tolerance uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayFindFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val, Tolerance)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindLong(pArray DTWAIN_ARRAY, Val int32) int32 {
    theProc := d.procs["DTWAIN_ArrayFindLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindLong64(pArray DTWAIN_ARRAY, Val int64) int32 {
    theProc := d.procs["DTWAIN_ArrayFindLong64"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindString(pArray DTWAIN_ARRAY, pString uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayFindString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), pString)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindStringA(pArray DTWAIN_ARRAY, pString string) int32 {
    theProc := d.procs["DTWAIN_ArrayFindStringA"]
    arg_0 := []byte(pString)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindStringW(pArray DTWAIN_ARRAY, pString uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayFindStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), pString)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFindWideString(pArray DTWAIN_ARRAY, pString uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayFindWideString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), pString)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFix32GetAt(aFix32 DTWAIN_ARRAY, lPos int32, Whole *int32, Frac *int32) int32 {
    theProc := d.procs["DTWAIN_ArrayFix32GetAt"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(aFix32), uintptr(lPos), uintptr(unsafe.Pointer(Whole)), uintptr(unsafe.Pointer(Frac)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFix32SetAt(aFix32 DTWAIN_ARRAY, lPos int32, Whole int32, Frac int32) int32 {
    theProc := d.procs["DTWAIN_ArrayFix32SetAt"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(aFix32), uintptr(lPos), uintptr(Whole), uintptr(Frac))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFloatToANSIString(FloatArray DTWAIN_ARRAY) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayFloatToANSIString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FloatArray))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFloatToString(FloatArray DTWAIN_ARRAY) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayFloatToString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FloatArray))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayFloatToWideString(FloatArray DTWAIN_ARRAY) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayFloatToWideString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FloatArray))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAt(pArray DTWAIN_ARRAY, nWhere int32, pVariant LPVOID) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAt"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(pVariant))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtANSIString(pArray DTWAIN_ARRAY, nWhere int32, pStr []byte) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtANSIString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&pStr[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFloat(pArray DTWAIN_ARRAY, nWhere int32, pVal *float64) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(pVal)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFloatEx(pArray DTWAIN_ARRAY, nWhere int32) float64 {
    theProc := d.procs["DTWAIN_ArrayGetAtFloatEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere))
    return float64(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFloatString(pArray DTWAIN_ARRAY, nWhere int32, Val []uint16) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&Val[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFloatStringA(pArray DTWAIN_ARRAY, nWhere int32, Val []byte) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtFloatStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&Val[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFloatStringW(pArray DTWAIN_ARRAY, nWhere int32, Val []uint16) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&Val[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFrame(FrameArray DTWAIN_ARRAY, nWhere int32, pleft *float64, ptop *float64, pright *float64, pbottom *float64) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtFrame"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), uintptr(unsafe.Pointer(pleft)), uintptr(unsafe.Pointer(ptop)), uintptr(unsafe.Pointer(pright)), uintptr(unsafe.Pointer(pbottom)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFrameEx(FrameArray DTWAIN_ARRAY, nWhere int32, Frame DTWAIN_FRAME) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtFrameEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), uintptr(Frame))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFrameString(FrameArray DTWAIN_ARRAY, nWhere int32, left []uint16, top []uint16, right []uint16, bottom []uint16) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtFrameString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), uintptr(unsafe.Pointer(&left[0])), uintptr(unsafe.Pointer(&top[0])), uintptr(unsafe.Pointer(&right[0])), uintptr(unsafe.Pointer(&bottom[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFrameStringA(FrameArray DTWAIN_ARRAY, nWhere int32, left []byte, top []byte, right []byte, bottom []byte) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtFrameStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), uintptr(unsafe.Pointer(&left[0])), uintptr(unsafe.Pointer(&top[0])), uintptr(unsafe.Pointer(&right[0])), uintptr(unsafe.Pointer(&bottom[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtFrameStringW(FrameArray DTWAIN_ARRAY, nWhere int32, left []uint16, top []uint16, right []uint16, bottom []uint16) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtFrameStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), uintptr(unsafe.Pointer(&left[0])), uintptr(unsafe.Pointer(&top[0])), uintptr(unsafe.Pointer(&right[0])), uintptr(unsafe.Pointer(&bottom[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtLong(pArray DTWAIN_ARRAY, nWhere int32, pVal *int32) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(pVal)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtLong64(pArray DTWAIN_ARRAY, nWhere int32, pVal *int64) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtLong64"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(pVal)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtLong64Ex(pArray DTWAIN_ARRAY, nWhere int32) int64 {
    theProc := d.procs["DTWAIN_ArrayGetAtLong64Ex"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere))
    return int64(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtLongEx(pArray DTWAIN_ARRAY, nWhere int32) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtLongEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtSource(pArray DTWAIN_ARRAY, nWhere int32, ppSource LPDTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtSource"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(ppSource)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtSourceEx(pArray DTWAIN_ARRAY, nWhere int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_ArrayGetAtSourceEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtString(pArray DTWAIN_ARRAY, nWhere int32, pStr []uint16) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&pStr[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtStringA(pArray DTWAIN_ARRAY, nWhere int32, pStr []byte) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&pStr[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtStringW(pArray DTWAIN_ARRAY, nWhere int32, pStr []uint16) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&pStr[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetAtWideString(pArray DTWAIN_ARRAY, nWhere int32, pStr []uint16) int32 {
    theProc := d.procs["DTWAIN_ArrayGetAtWideString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&pStr[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetBuffer(pArray DTWAIN_ARRAY, nPos int32) LPVOID {
    theProc := d.procs["DTWAIN_ArrayGetBuffer"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nPos))
    return LPVOID(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetCapValues(Source DTWAIN_SOURCE, lCap int32, lGetType int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayGetCapValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCap), uintptr(lGetType))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetCapValuesEx(Source DTWAIN_SOURCE, lCap int32, lGetType int32, lContainerType int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayGetCapValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCap), uintptr(lGetType), uintptr(lContainerType))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetCapValuesEx2(Source DTWAIN_SOURCE, lCap int32, lGetType int32, lContainerType int32, nDataType int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayGetCapValuesEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCap), uintptr(lGetType), uintptr(lContainerType), uintptr(nDataType))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetCount(pArray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_ArrayGetCount"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetMaxStringLength(a DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_ArrayGetMaxStringLength"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(a))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetSourceAt(pArray DTWAIN_ARRAY, nWhere int32, ppSource LPDTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_ArrayGetSourceAt"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(ppSource)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetStringLength(a DTWAIN_ARRAY, nWhichString int32) int32 {
    theProc := d.procs["DTWAIN_ArrayGetStringLength"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(a), uintptr(nWhichString))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayGetType(pArray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_ArrayGetType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInit() DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayInit"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAt(pArray DTWAIN_ARRAY, nWhere int32, pVariant LPVOID) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAt"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(pVariant))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtANSIString(pArray DTWAIN_ARRAY, nWhere int32, pVal string) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtANSIString"]
    arg_0 := []byte(pVal)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtANSIStringN(pArray DTWAIN_ARRAY, nWhere int32, Val string, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtANSIStringN"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFloat(pArray DTWAIN_ARRAY, nWhere int32, pVal float64) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(pVal))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFloatN(pArray DTWAIN_ARRAY, nWhere int32, Val float64, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFloatN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(Val), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFloatString(pArray DTWAIN_ARRAY, nWhere int32, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFloatStringA(pArray DTWAIN_ARRAY, nWhere int32, Val string) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFloatStringA"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFloatStringN(pArray DTWAIN_ARRAY, nWhere int32, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFloatStringN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFloatStringNA(pArray DTWAIN_ARRAY, nWhere int32, Val string, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFloatStringNA"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFloatStringNW(pArray DTWAIN_ARRAY, nWhere int32, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFloatStringNW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFloatStringW(pArray DTWAIN_ARRAY, nWhere int32, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFrame(pArray DTWAIN_ARRAY, nWhere int32, frame DTWAIN_FRAME) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFrame"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(frame))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtFrameN(pArray DTWAIN_ARRAY, nWhere int32, frame DTWAIN_FRAME, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtFrameN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(frame), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtLong(pArray DTWAIN_ARRAY, nWhere int32, pVal int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(pVal))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtLong64(pArray DTWAIN_ARRAY, nWhere int32, Val int64) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtLong64"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(Val))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtLong64N(pArray DTWAIN_ARRAY, nWhere int32, Val int64, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtLong64N"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(Val), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtLongN(pArray DTWAIN_ARRAY, nWhere int32, pVal int32, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtLongN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(pVal), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtN(pArray DTWAIN_ARRAY, nWhere int32, pVariant LPVOID, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(pVariant), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtString(pArray DTWAIN_ARRAY, nWhere int32, pVal uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), pVal)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtStringA(pArray DTWAIN_ARRAY, nWhere int32, pVal string) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtStringA"]
    arg_0 := []byte(pVal)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtStringN(pArray DTWAIN_ARRAY, nWhere int32, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtStringN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtStringNA(pArray DTWAIN_ARRAY, nWhere int32, Val string, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtStringNA"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtStringNW(pArray DTWAIN_ARRAY, nWhere int32, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtStringNW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtStringW(pArray DTWAIN_ARRAY, nWhere int32, pVal uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), pVal)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtWideString(pArray DTWAIN_ARRAY, nWhere int32, pVal uintptr) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtWideString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), pVal)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayInsertAtWideStringN(pArray DTWAIN_ARRAY, nWhere int32, Val uintptr, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayInsertAtWideStringN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), Val, uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayRemoveAll(pArray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_ArrayRemoveAll"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayRemoveAt(pArray DTWAIN_ARRAY, nWhere int32) int32 {
    theProc := d.procs["DTWAIN_ArrayRemoveAt"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayRemoveAtN(pArray DTWAIN_ARRAY, nWhere int32, num int32) int32 {
    theProc := d.procs["DTWAIN_ArrayRemoveAtN"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(num))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayResize(pArray DTWAIN_ARRAY, NewSize int32) int32 {
    theProc := d.procs["DTWAIN_ArrayResize"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(NewSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAt(pArray DTWAIN_ARRAY, lPos int32, pVariant LPVOID) int32 {
    theProc := d.procs["DTWAIN_ArraySetAt"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(lPos), uintptr(pVariant))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtANSIString(pArray DTWAIN_ARRAY, nWhere int32, pStr string) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtANSIString"]
    arg_0 := []byte(pStr)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtFloat(pArray DTWAIN_ARRAY, nWhere int32, pVal float64) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(pVal))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtFloatString(pArray DTWAIN_ARRAY, nWhere int32, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtFloatStringA(pArray DTWAIN_ARRAY, nWhere int32, Val string) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtFloatStringA"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtFloatStringW(pArray DTWAIN_ARRAY, nWhere int32, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtFrame(FrameArray DTWAIN_ARRAY, nWhere int32, left float64, top float64, right float64, bottom float64) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtFrame"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), uintptr(left), uintptr(top), uintptr(right), uintptr(bottom))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtFrameEx(FrameArray DTWAIN_ARRAY, nWhere int32, Frame DTWAIN_FRAME) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtFrameEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), uintptr(Frame))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtFrameString(FrameArray DTWAIN_ARRAY, nWhere int32, left uintptr, top uintptr, right uintptr, bottom uintptr) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtFrameString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), left, top, right, bottom)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtFrameStringA(FrameArray DTWAIN_ARRAY, nWhere int32, left string, top string, right string, bottom string) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtFrameStringA"]
    arg_0 := []byte(left)
    arg_1 := []byte(top)
    arg_2 := []byte(right)
    arg_3 := []byte(bottom)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])), uintptr(unsafe.Pointer(&arg_3[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtFrameStringW(FrameArray DTWAIN_ARRAY, nWhere int32, left uintptr, top uintptr, right uintptr, bottom uintptr) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtFrameStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FrameArray), uintptr(nWhere), left, top, right, bottom)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtLong(pArray DTWAIN_ARRAY, nWhere int32, pVal int32) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(pVal))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtLong64(pArray DTWAIN_ARRAY, nWhere int32, Val int64) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtLong64"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(Val))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtString(pArray DTWAIN_ARRAY, nWhere int32, pStr uintptr) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), pStr)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtStringA(pArray DTWAIN_ARRAY, nWhere int32, pStr string) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtStringA"]
    arg_0 := []byte(pStr)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtStringW(pArray DTWAIN_ARRAY, nWhere int32, pStr uintptr) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), pStr)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArraySetAtWideString(pArray DTWAIN_ARRAY, nWhere int32, pStr uintptr) int32 {
    theProc := d.procs["DTWAIN_ArraySetAtWideString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhere), pStr)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayStringToFloat(StringArray DTWAIN_ARRAY) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayStringToFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(StringArray))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ArrayWideStringToFloat(StringArray DTWAIN_ARRAY) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_ArrayWideStringToFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(StringArray))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_CallCallback(wParam int32, lParam int32, UserData int32) int32 {
    theProc := d.procs["DTWAIN_CallCallback"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(wParam), uintptr(lParam), uintptr(UserData))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_CallCallback64(wParam int32, lParam int32, UserData int64) int32 {
    theProc := d.procs["DTWAIN_CallCallback64"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(wParam), uintptr(lParam), uintptr(UserData))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_CallDSMProc(AppID DTWAIN_IDENTITY, SourceId DTWAIN_IDENTITY, lDG int32, lDAT int32, lMSG int32, pData LPVOID) int32 {
    theProc := d.procs["DTWAIN_CallDSMProc"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(AppID), uintptr(SourceId), uintptr(lDG), uintptr(lDAT), uintptr(lMSG), uintptr(pData))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_CheckHandles(bCheck int32) int32 {
    theProc := d.procs["DTWAIN_CheckHandles"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bCheck))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ClearBuffers(Source DTWAIN_SOURCE, ClearBuffer int32) int32 {
    theProc := d.procs["DTWAIN_ClearBuffers"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(ClearBuffer))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ClearErrorBuffer() int32 {
    theProc := d.procs["DTWAIN_ClearErrorBuffer"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ClearPDFTextElements(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_ClearPDFTextElements"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ClearPage(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_ClearPage"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_CloseSource(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_CloseSource"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_CloseSourceUI(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_CloseSourceUI"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ConvertDIBToBitmap(hDib HANDLE, hPalette HANDLE) HANDLE {
    theProc := d.procs["DTWAIN_ConvertDIBToBitmap"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), uintptr(hPalette))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ConvertDIBToFullBitmap(hDib HANDLE, isBMP int32) HANDLE {
    theProc := d.procs["DTWAIN_ConvertDIBToFullBitmap"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), uintptr(isBMP))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ConvertToAPIString(lpOrigString uintptr) HANDLE {
    theProc := d.procs["DTWAIN_ConvertToAPIString"]
    v1, _, _ := syscall.SyscallN(theProc, lpOrigString)
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ConvertToAPIStringA(lpOrigString string) HANDLE {
    theProc := d.procs["DTWAIN_ConvertToAPIStringA"]
    arg_0 := []byte(lpOrigString)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ConvertToAPIStringEx(lpOrigString uintptr, lpOutString []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_ConvertToAPIStringEx"]
    v1, _, _ := syscall.SyscallN(theProc, lpOrigString, uintptr(unsafe.Pointer(&lpOutString[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ConvertToAPIStringExA(lpOrigString string, lpOutString []byte, nSize int32) int32 {
    theProc := d.procs["DTWAIN_ConvertToAPIStringExA"]
    arg_0 := []byte(lpOrigString)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&lpOutString[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ConvertToAPIStringExW(lpOrigString uintptr, lpOutString []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_ConvertToAPIStringExW"]
    v1, _, _ := syscall.SyscallN(theProc, lpOrigString, uintptr(unsafe.Pointer(&lpOutString[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ConvertToAPIStringW(lpOrigString uintptr) HANDLE {
    theProc := d.procs["DTWAIN_ConvertToAPIStringW"]
    v1, _, _ := syscall.SyscallN(theProc, lpOrigString)
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_CreateAcquisitionArray() DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_CreateAcquisitionArray"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_CreatePDFTextElement() DTWAIN_PDFTEXTELEMENT {
    theProc := d.procs["DTWAIN_CreatePDFTextElement"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_PDFTEXTELEMENT(v1)
}

func (d *DTWAIN_DLL) DTWAIN_CreatePDFTextElementCopy(TextElement DTWAIN_PDFTEXTELEMENT) DTWAIN_PDFTEXTELEMENT {
    theProc := d.procs["DTWAIN_CreatePDFTextElementCopy"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement))
    return DTWAIN_PDFTEXTELEMENT(v1)
}

func (d *DTWAIN_DLL) DTWAIN_DeleteDIB(hDib HANDLE) int32 {
    theProc := d.procs["DTWAIN_DeleteDIB"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_DestroyAcquisitionArray(aAcq DTWAIN_ARRAY, bDestroyData int32) int32 {
    theProc := d.procs["DTWAIN_DestroyAcquisitionArray"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(aAcq), uintptr(bDestroyData))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_DestroyPDFTextElement(TextElement DTWAIN_PDFTEXTELEMENT) int32 {
    theProc := d.procs["DTWAIN_DestroyPDFTextElement"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_DisableAppWindow(hWnd HWND, bDisable int32) int32 {
    theProc := d.procs["DTWAIN_DisableAppWindow"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWnd), uintptr(bDisable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableAutoBorderDetect(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnableAutoBorderDetect"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableAutoBright(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnableAutoBright"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableAutoDeskew(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnableAutoDeskew"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableAutoFeed(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnableAutoFeed"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableAutoRotate(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnableAutoRotate"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableAutoScan(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnableAutoScan"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableAutomaticSenseMedium(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnableAutomaticSenseMedium"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableBarcodeDetection(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnableBarcodeDetection"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableDuplex(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnableDuplex"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableFeeder(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnableFeeder"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableGetMessageLoop(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnableGetMessageLoop"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableGetMessageLoopDetection(bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnableGetMessageLoopDetection"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableIndicator(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnableIndicator"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableJobFileHandling(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnableJobFileHandling"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableLamp(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnableLamp"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableMsgNotify(bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnableMsgNotify"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnablePatchcodeDetection(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnablePatchcodeDetection"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnablePeekMessageLoop(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnablePeekMessageLoop"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnablePrinter(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnablePrinter"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableThumbnail(Source DTWAIN_SOURCE, bEnable int32) int32 {
    theProc := d.procs["DTWAIN_EnableThumbnail"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bEnable))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnableTripletsNotify(bSet int32) int32 {
    theProc := d.procs["DTWAIN_EnableTripletsNotify"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EndThread(DLLHandle DTWAIN_HANDLE) int32 {
    theProc := d.procs["DTWAIN_EndThread"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(DLLHandle))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EndTwainSession() int32 {
    theProc := d.procs["DTWAIN_EndTwainSession"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAlarmVolumes(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, expandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumAlarmVolumes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(expandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAlarmVolumesEx(Source DTWAIN_SOURCE, expandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumAlarmVolumesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(expandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAlarms(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumAlarms"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAlarmsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumAlarmsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAudioXferMechs(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumAudioXferMechs"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAudioXferMechsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumAudioXferMechsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAutoFeedValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumAutoFeedValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAutoFeedValuesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumAutoFeedValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAutomaticCaptures(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumAutomaticCaptures"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAutomaticCapturesEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumAutomaticCapturesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAutomaticSenseMedium(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumAutomaticSenseMedium"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumAutomaticSenseMediumEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumAutomaticSenseMediumEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeCodes(Source DTWAIN_SOURCE, PCodes LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumBarcodeCodes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(PCodes)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeCodesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBarcodeCodesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeMaxPriorities(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumBarcodeMaxPriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeMaxPrioritiesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBarcodeMaxPrioritiesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeMaxRetries(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumBarcodeMaxRetries"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeMaxRetriesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBarcodeMaxRetriesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodePriorities(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumBarcodePriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodePrioritiesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBarcodePrioritiesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeSearchModes(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumBarcodeSearchModes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeSearchModesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBarcodeSearchModesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeTimeOutValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumBarcodeTimeOutValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBarcodeTimeOutValuesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBarcodeTimeOutValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBitDepths(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumBitDepths"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBitDepthsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBitDepthsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBitDepthsEx2(Source DTWAIN_SOURCE, PixelType int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBitDepthsEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PixelType))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBottomCameras(Source DTWAIN_SOURCE, Cameras LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumBottomCameras"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Cameras)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBottomCamerasEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBottomCamerasEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBrightnessValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumBrightnessValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumBrightnessValuesEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumBrightnessValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumCameras(Source DTWAIN_SOURCE, Cameras LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumCameras"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Cameras)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumCamerasEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumCamerasEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumCamerasEx2(Source DTWAIN_SOURCE, nWhichCamera int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumCamerasEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nWhichCamera))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumCapLabels(lCapability int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumCapLabels"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lCapability))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumCompressionTypes(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumCompressionTypes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumCompressionTypesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumCompressionTypesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumCompressionTypesEx2(Source DTWAIN_SOURCE, lFileType int32, bUseBufferedMode int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumCompressionTypesEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lFileType), uintptr(bUseBufferedMode))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumContrastValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumContrastValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumContrastValuesEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumContrastValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumCustomCaps(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumCustomCaps"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumCustomCapsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumCustomCapsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumDoubleFeedDetectLengths(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumDoubleFeedDetectLengths"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumDoubleFeedDetectLengthsEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumDoubleFeedDetectLengthsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumDoubleFeedDetectValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumDoubleFeedDetectValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumDoubleFeedDetectValuesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumDoubleFeedDetectValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumExtImageInfoTypes(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumExtImageInfoTypes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumExtImageInfoTypesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumExtImageInfoTypesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumExtendedCaps(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumExtendedCaps"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumExtendedCapsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumExtendedCapsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumExtendedCapsEx2(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumExtendedCapsEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumFileTypeBitsPerPixel(FileType int32, Array LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumFileTypeBitsPerPixel"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FileType), uintptr(unsafe.Pointer(Array)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumFileXferFormats(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumFileXferFormats"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumFileXferFormatsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumFileXferFormatsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumHalftones(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumHalftones"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumHalftonesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumHalftonesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumHighlightValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumHighlightValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumHighlightValuesEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumHighlightValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumJobControls(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumJobControls"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumJobControlsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumJobControlsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumLightPaths(Source DTWAIN_SOURCE, LightPath LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumLightPaths"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(LightPath)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumLightPathsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumLightPathsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumLightSources(Source DTWAIN_SOURCE, LightSources LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumLightSources"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(LightSources)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumLightSourcesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumLightSourcesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumMaxBuffers(Source DTWAIN_SOURCE, pMaxBufs LPDTWAIN_ARRAY, bExpandRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumMaxBuffers"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pMaxBufs)), uintptr(bExpandRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumMaxBuffersEx(Source DTWAIN_SOURCE, bExpandRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumMaxBuffersEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumNoiseFilters(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumNoiseFilters"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumNoiseFiltersEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumNoiseFiltersEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumOCRInterfaces(OCRInterfaces LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumOCRInterfaces"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(OCRInterfaces)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumOCRInterfacesEx() DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumOCRInterfacesEx"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumOCRSupportedCaps(Engine DTWAIN_OCRENGINE, SupportedCaps LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumOCRSupportedCaps"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(SupportedCaps)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumOrientations(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumOrientations"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumOrientationsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumOrientationsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumOverscanValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumOverscanValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumOverscanValuesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumOverscanValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPaperSizes(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumPaperSizes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPaperSizesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumPaperSizesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeCodes(Source DTWAIN_SOURCE, PCodes LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumPatchcodeCodes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(PCodes)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeCodesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumPatchcodeCodesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeMaxPriorities(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumPatchcodeMaxPriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeMaxPrioritiesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumPatchcodeMaxPrioritiesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeMaxRetries(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumPatchcodeMaxRetries"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeMaxRetriesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumPatchcodeMaxRetriesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodePriorities(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumPatchcodePriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodePrioritiesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumPatchcodePrioritiesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeSearchModes(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumPatchcodeSearchModes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeSearchModesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumPatchcodeSearchModesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeTimeOutValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumPatchcodeTimeOutValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPatchcodeTimeOutValuesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumPatchcodeTimeOutValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPixelTypes(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumPixelTypes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPixelTypesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumPixelTypesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPrinterStringModes(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumPrinterStringModes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumPrinterStringModesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumPrinterStringModesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumResolutionValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumResolutionValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumResolutionValuesEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumResolutionValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumShadowValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumShadowValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumShadowValuesEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumShadowValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSourceUnits(Source DTWAIN_SOURCE, lpArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumSourceUnits"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSourceUnitsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumSourceUnitsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSourceValues(Source DTWAIN_SOURCE, capName uintptr, values LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumSourceValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), capName, uintptr(unsafe.Pointer(values)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSourceValuesA(Source DTWAIN_SOURCE, capName string, values LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumSourceValuesA"]
    arg_0 := []byte(capName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(values)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSourceValuesW(Source DTWAIN_SOURCE, capName uintptr, values LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumSourceValuesW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), capName, uintptr(unsafe.Pointer(values)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSources(lpArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumSources"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(lpArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSourcesEx() DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumSourcesEx"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSupportedCaps(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumSupportedCaps"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSupportedCapsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumSupportedCapsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSupportedCapsEx2(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumSupportedCapsEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSupportedExtImageInfo(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumSupportedExtImageInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSupportedExtImageInfoEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumSupportedExtImageInfoEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSupportedFileTypes() DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumSupportedFileTypes"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSupportedMultiPageFileTypes() DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumSupportedMultiPageFileTypes"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumSupportedSinglePageFileTypes() DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumSupportedSinglePageFileTypes"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumThresholdValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumThresholdValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumThresholdValuesEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumThresholdValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumTopCameras(Source DTWAIN_SOURCE, Cameras LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumTopCameras"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Cameras)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumTopCamerasEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumTopCamerasEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumTwainPrinters(Source DTWAIN_SOURCE, lpAvailPrinters LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_EnumTwainPrinters"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpAvailPrinters)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumTwainPrintersEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumTwainPrintersEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumXResolutionValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumXResolutionValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumXResolutionValuesEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumXResolutionValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumYResolutionValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY, bExpandIfRange int32) int32 {
    theProc := d.procs["DTWAIN_EnumYResolutionValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)), uintptr(bExpandIfRange))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_EnumYResolutionValuesEx(Source DTWAIN_SOURCE, bExpandIfRange int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_EnumYResolutionValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bExpandIfRange))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ExecuteOCR(Engine DTWAIN_OCRENGINE, szFileName uintptr, nStartPage int32, nEndPage int32) int32 {
    theProc := d.procs["DTWAIN_ExecuteOCR"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), szFileName, uintptr(nStartPage), uintptr(nEndPage))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ExecuteOCRA(Engine DTWAIN_OCRENGINE, szFileName string, nStartPage int32, nEndPage int32) int32 {
    theProc := d.procs["DTWAIN_ExecuteOCRA"]
    arg_0 := []byte(szFileName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(nStartPage), uintptr(nEndPage))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ExecuteOCRW(Engine DTWAIN_OCRENGINE, szFileName uintptr, nStartPage int32, nEndPage int32) int32 {
    theProc := d.procs["DTWAIN_ExecuteOCRW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), szFileName, uintptr(nStartPage), uintptr(nEndPage))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FeedPage(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_FeedPage"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FlipBitmap(hDib HANDLE) int32 {
    theProc := d.procs["DTWAIN_FlipBitmap"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FlushAcquiredPages(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_FlushAcquiredPages"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameCreate(Left float64, Top float64, Right float64, Bottom float64) DTWAIN_FRAME {
    theProc := d.procs["DTWAIN_FrameCreate"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Left), uintptr(Top), uintptr(Right), uintptr(Bottom))
    return DTWAIN_FRAME(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameCreateString(Left uintptr, Top uintptr, Right uintptr, Bottom uintptr) DTWAIN_FRAME {
    theProc := d.procs["DTWAIN_FrameCreateString"]
    v1, _, _ := syscall.SyscallN(theProc, Left, Top, Right, Bottom)
    return DTWAIN_FRAME(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameCreateStringA(Left string, Top string, Right string, Bottom string) DTWAIN_FRAME {
    theProc := d.procs["DTWAIN_FrameCreateStringA"]
    arg_0 := []byte(Left)
    arg_1 := []byte(Top)
    arg_2 := []byte(Right)
    arg_3 := []byte(Bottom)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])), uintptr(unsafe.Pointer(&arg_3[0])))
    return DTWAIN_FRAME(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameCreateStringW(Left uintptr, Top uintptr, Right uintptr, Bottom uintptr) DTWAIN_FRAME {
    theProc := d.procs["DTWAIN_FrameCreateStringW"]
    v1, _, _ := syscall.SyscallN(theProc, Left, Top, Right, Bottom)
    return DTWAIN_FRAME(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameDestroy(Frame DTWAIN_FRAME) int32 {
    theProc := d.procs["DTWAIN_FrameDestroy"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameGetAll(Frame DTWAIN_FRAME, Left *float64, Top *float64, Right *float64, Bottom *float64) int32 {
    theProc := d.procs["DTWAIN_FrameGetAll"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(unsafe.Pointer(Left)), uintptr(unsafe.Pointer(Top)), uintptr(unsafe.Pointer(Right)), uintptr(unsafe.Pointer(Bottom)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameGetAllString(Frame DTWAIN_FRAME, Left []uint16, Top []uint16, Right []uint16, Bottom []uint16) int32 {
    theProc := d.procs["DTWAIN_FrameGetAllString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(unsafe.Pointer(&Left[0])), uintptr(unsafe.Pointer(&Top[0])), uintptr(unsafe.Pointer(&Right[0])), uintptr(unsafe.Pointer(&Bottom[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameGetAllStringA(Frame DTWAIN_FRAME, Left []byte, Top []byte, Right []byte, Bottom []byte) int32 {
    theProc := d.procs["DTWAIN_FrameGetAllStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(unsafe.Pointer(&Left[0])), uintptr(unsafe.Pointer(&Top[0])), uintptr(unsafe.Pointer(&Right[0])), uintptr(unsafe.Pointer(&Bottom[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameGetAllStringW(Frame DTWAIN_FRAME, Left []uint16, Top []uint16, Right []uint16, Bottom []uint16) int32 {
    theProc := d.procs["DTWAIN_FrameGetAllStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(unsafe.Pointer(&Left[0])), uintptr(unsafe.Pointer(&Top[0])), uintptr(unsafe.Pointer(&Right[0])), uintptr(unsafe.Pointer(&Bottom[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameGetValue(Frame DTWAIN_FRAME, nWhich int32, Value *float64) int32 {
    theProc := d.procs["DTWAIN_FrameGetValue"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(nWhich), uintptr(unsafe.Pointer(Value)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameGetValueString(Frame DTWAIN_FRAME, nWhich int32, Value []uint16) int32 {
    theProc := d.procs["DTWAIN_FrameGetValueString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(nWhich), uintptr(unsafe.Pointer(&Value[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameGetValueStringA(Frame DTWAIN_FRAME, nWhich int32, Value []byte) int32 {
    theProc := d.procs["DTWAIN_FrameGetValueStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(nWhich), uintptr(unsafe.Pointer(&Value[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameGetValueStringW(Frame DTWAIN_FRAME, nWhich int32, Value []uint16) int32 {
    theProc := d.procs["DTWAIN_FrameGetValueStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(nWhich), uintptr(unsafe.Pointer(&Value[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameIsValid(Frame DTWAIN_FRAME) int32 {
    theProc := d.procs["DTWAIN_FrameIsValid"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameSetAll(Frame DTWAIN_FRAME, Left float64, Top float64, Right float64, Bottom float64) int32 {
    theProc := d.procs["DTWAIN_FrameSetAll"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(Left), uintptr(Top), uintptr(Right), uintptr(Bottom))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameSetAllString(Frame DTWAIN_FRAME, Left uintptr, Top uintptr, Right uintptr, Bottom uintptr) int32 {
    theProc := d.procs["DTWAIN_FrameSetAllString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), Left, Top, Right, Bottom)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameSetAllStringA(Frame DTWAIN_FRAME, Left string, Top string, Right string, Bottom string) int32 {
    theProc := d.procs["DTWAIN_FrameSetAllStringA"]
    arg_0 := []byte(Left)
    arg_1 := []byte(Top)
    arg_2 := []byte(Right)
    arg_3 := []byte(Bottom)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])), uintptr(unsafe.Pointer(&arg_3[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameSetAllStringW(Frame DTWAIN_FRAME, Left uintptr, Top uintptr, Right uintptr, Bottom uintptr) int32 {
    theProc := d.procs["DTWAIN_FrameSetAllStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), Left, Top, Right, Bottom)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameSetValue(Frame DTWAIN_FRAME, nWhich int32, Value float64) int32 {
    theProc := d.procs["DTWAIN_FrameSetValue"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(nWhich), uintptr(Value))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameSetValueString(Frame DTWAIN_FRAME, nWhich int32, Value uintptr) int32 {
    theProc := d.procs["DTWAIN_FrameSetValueString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(nWhich), Value)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameSetValueStringA(Frame DTWAIN_FRAME, nWhich int32, Value string) int32 {
    theProc := d.procs["DTWAIN_FrameSetValueStringA"]
    arg_0 := []byte(Value)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(nWhich), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FrameSetValueStringW(Frame DTWAIN_FRAME, nWhich int32, Value uintptr) int32 {
    theProc := d.procs["DTWAIN_FrameSetValueStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Frame), uintptr(nWhich), Value)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FreeExtImageInfo(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_FreeExtImageInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FreeMemory(h HANDLE) int32 {
    theProc := d.procs["DTWAIN_FreeMemory"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(h))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_FreeMemoryEx(h HANDLE) int32 {
    theProc := d.procs["DTWAIN_FreeMemoryEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(h))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAPIHandleStatus(pHandle DTWAIN_HANDLE) int32 {
    theProc := d.procs["DTWAIN_GetAPIHandleStatus"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pHandle))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireArea(Source DTWAIN_SOURCE, lGetType int32, FloatEnum LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetAcquireArea"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lGetType), uintptr(unsafe.Pointer(FloatEnum)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireArea2(Source DTWAIN_SOURCE, left *float64, top *float64, right *float64, bottom *float64, lpUnit *int32) int32 {
    theProc := d.procs["DTWAIN_GetAcquireArea2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(left)), uintptr(unsafe.Pointer(top)), uintptr(unsafe.Pointer(right)), uintptr(unsafe.Pointer(bottom)), uintptr(unsafe.Pointer(lpUnit)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireArea2String(Source DTWAIN_SOURCE, left []uint16, top []uint16, right []uint16, bottom []uint16, Unit *int32) int32 {
    theProc := d.procs["DTWAIN_GetAcquireArea2String"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&left[0])), uintptr(unsafe.Pointer(&top[0])), uintptr(unsafe.Pointer(&right[0])), uintptr(unsafe.Pointer(&bottom[0])), uintptr(unsafe.Pointer(Unit)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireArea2StringA(Source DTWAIN_SOURCE, left []byte, top []byte, right []byte, bottom []byte, Unit *int32) int32 {
    theProc := d.procs["DTWAIN_GetAcquireArea2StringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&left[0])), uintptr(unsafe.Pointer(&top[0])), uintptr(unsafe.Pointer(&right[0])), uintptr(unsafe.Pointer(&bottom[0])), uintptr(unsafe.Pointer(Unit)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireArea2StringW(Source DTWAIN_SOURCE, left []uint16, top []uint16, right []uint16, bottom []uint16, Unit *int32) int32 {
    theProc := d.procs["DTWAIN_GetAcquireArea2StringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&left[0])), uintptr(unsafe.Pointer(&top[0])), uintptr(unsafe.Pointer(&right[0])), uintptr(unsafe.Pointer(&bottom[0])), uintptr(unsafe.Pointer(Unit)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireAreaEx(Source DTWAIN_SOURCE, lGetType int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_GetAcquireAreaEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lGetType))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireMetrics(source DTWAIN_SOURCE, ImageCount *int32, SheetCount *int32) int32 {
    theProc := d.procs["DTWAIN_GetAcquireMetrics"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(source), uintptr(unsafe.Pointer(ImageCount)), uintptr(unsafe.Pointer(SheetCount)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireStripBuffer(Source DTWAIN_SOURCE) HANDLE {
    theProc := d.procs["DTWAIN_GetAcquireStripBuffer"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireStripData(Source DTWAIN_SOURCE, lpCompression *int32, lpBytesPerRow *uint32, lpColumns *uint32, lpRows *uint32, XOffset *uint32, YOffset *uint32, lpBytesWritten *uint32) int32 {
    theProc := d.procs["DTWAIN_GetAcquireStripData"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpCompression)), uintptr(unsafe.Pointer(lpBytesPerRow)), uintptr(unsafe.Pointer(lpColumns)), uintptr(unsafe.Pointer(lpRows)), uintptr(unsafe.Pointer(XOffset)), uintptr(unsafe.Pointer(YOffset)), uintptr(unsafe.Pointer(lpBytesWritten)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquireStripSizes(Source DTWAIN_SOURCE, lpMin *uint32, lpMax *uint32, lpPreferred *uint32) int32 {
    theProc := d.procs["DTWAIN_GetAcquireStripSizes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpMin)), uintptr(unsafe.Pointer(lpMax)), uintptr(unsafe.Pointer(lpPreferred)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquiredImage(aAcq DTWAIN_ARRAY, nWhichAcq int32, nWhichDib int32) HANDLE {
    theProc := d.procs["DTWAIN_GetAcquiredImage"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(aAcq), uintptr(nWhichAcq), uintptr(nWhichDib))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquiredImageArray(aAcq DTWAIN_ARRAY, nWhichAcq int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_GetAcquiredImageArray"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(aAcq), uintptr(nWhichAcq))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAcquisitionArray(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_GetAcquisitionArray"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetActiveDSMPath(lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetActiveDSMPath"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetActiveDSMPathA(lpszBuffer []byte, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetActiveDSMPathA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetActiveDSMPathW(lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetActiveDSMPathW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetActiveDSMVersionInfo(szDLLInfo []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetActiveDSMVersionInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szDLLInfo[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetActiveDSMVersionInfoA(lpszBuffer []byte, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetActiveDSMVersionInfoA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetActiveDSMVersionInfoW(lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetActiveDSMVersionInfoW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAlarmVolume(Source DTWAIN_SOURCE, lpVolume *int32) int32 {
    theProc := d.procs["DTWAIN_GetAlarmVolume"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpVolume)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAllSourceDibs(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_GetAllSourceDibs"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAppInfo(szVerStr []uint16, szManu []uint16, szProdFam []uint16, szProdName []uint16) int32 {
    theProc := d.procs["DTWAIN_GetAppInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szVerStr[0])), uintptr(unsafe.Pointer(&szManu[0])), uintptr(unsafe.Pointer(&szProdFam[0])), uintptr(unsafe.Pointer(&szProdName[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAppInfoA(szVerStr []byte, szManu []byte, szProdFam []byte, szProdName []byte) int32 {
    theProc := d.procs["DTWAIN_GetAppInfoA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szVerStr[0])), uintptr(unsafe.Pointer(&szManu[0])), uintptr(unsafe.Pointer(&szProdFam[0])), uintptr(unsafe.Pointer(&szProdName[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAppInfoW(szVerStr []uint16, szManu []uint16, szProdFam []uint16, szProdName []uint16) int32 {
    theProc := d.procs["DTWAIN_GetAppInfoW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szVerStr[0])), uintptr(unsafe.Pointer(&szManu[0])), uintptr(unsafe.Pointer(&szProdFam[0])), uintptr(unsafe.Pointer(&szProdName[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAuthor(Source DTWAIN_SOURCE, szAuthor []uint16) int32 {
    theProc := d.procs["DTWAIN_GetAuthor"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szAuthor[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAuthorA(Source DTWAIN_SOURCE, szAuthor []byte) int32 {
    theProc := d.procs["DTWAIN_GetAuthorA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szAuthor[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetAuthorW(Source DTWAIN_SOURCE, szAuthor []uint16) int32 {
    theProc := d.procs["DTWAIN_GetAuthorW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szAuthor[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBarcodeMaxPriorities(Source DTWAIN_SOURCE, pMaxPriorities *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetBarcodeMaxPriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pMaxPriorities)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBarcodeMaxRetries(Source DTWAIN_SOURCE, pMaxRetries *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetBarcodeMaxRetries"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pMaxRetries)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBarcodePriorities(Source DTWAIN_SOURCE, SearchPriorities LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetBarcodePriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(SearchPriorities)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBarcodeSearchMode(Source DTWAIN_SOURCE, pSearchMode *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetBarcodeSearchMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pSearchMode)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBarcodeTimeOut(Source DTWAIN_SOURCE, pTimeOut *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetBarcodeTimeOut"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pTimeOut)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBatteryMinutes(Source DTWAIN_SOURCE, lpMinutes *int32) int32 {
    theProc := d.procs["DTWAIN_GetBatteryMinutes"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpMinutes)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBatteryPercent(Source DTWAIN_SOURCE, lpPercent *int32) int32 {
    theProc := d.procs["DTWAIN_GetBatteryPercent"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpPercent)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBitDepth(Source DTWAIN_SOURCE, BitDepth *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetBitDepth"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(BitDepth)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBitDepthEx(Source DTWAIN_SOURCE, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetBitDepthEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBlankPageAutoDetection(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetBlankPageAutoDetection"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBrightness(Source DTWAIN_SOURCE, Brightness *float64) int32 {
    theProc := d.procs["DTWAIN_GetBrightness"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Brightness)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBrightnessEx(Source DTWAIN_SOURCE) float64 {
    theProc := d.procs["DTWAIN_GetBrightnessEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return float64(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBrightnessString(Source DTWAIN_SOURCE, Brightness []uint16) int32 {
    theProc := d.procs["DTWAIN_GetBrightnessString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Brightness[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBrightnessStringA(Source DTWAIN_SOURCE, Contrast []byte) int32 {
    theProc := d.procs["DTWAIN_GetBrightnessStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Contrast[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBrightnessStringW(Source DTWAIN_SOURCE, Contrast []uint16) int32 {
    theProc := d.procs["DTWAIN_GetBrightnessStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Contrast[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetBufferedTransferInfo(Source DTWAIN_SOURCE, Compression *uint32, BytesPerRow *uint32, Columns *uint32, Rows *uint32, XOffset *uint32, YOffset *uint32, Flags *uint32, BytesWritten *uint32, MemoryLength *uint32) HANDLE {
    theProc := d.procs["DTWAIN_GetBufferedTransferInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Compression)), uintptr(unsafe.Pointer(BytesPerRow)), uintptr(unsafe.Pointer(Columns)), uintptr(unsafe.Pointer(Rows)), uintptr(unsafe.Pointer(XOffset)), uintptr(unsafe.Pointer(YOffset)), uintptr(unsafe.Pointer(Flags)), uintptr(unsafe.Pointer(BytesWritten)), uintptr(unsafe.Pointer(MemoryLength)))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCallback() DTWAIN_CALLBACK_PROC {
    theProc := d.procs["DTWAIN_GetCallback"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_CALLBACK_PROC(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCallback64() DTWAIN_CALLBACK_PROC64 {
    theProc := d.procs["DTWAIN_GetCallback64"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_CALLBACK_PROC64(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapArrayType(Source DTWAIN_SOURCE, nCap int32) int32 {
    theProc := d.procs["DTWAIN_GetCapArrayType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nCap))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapContainer(Source DTWAIN_SOURCE, nCap int32, lCapType int32) int32 {
    theProc := d.procs["DTWAIN_GetCapContainer"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nCap), uintptr(lCapType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapContainerEx(nCap int32, bSetContainer int32, ConTypes LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetCapContainerEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nCap), uintptr(bSetContainer), uintptr(unsafe.Pointer(ConTypes)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapContainerEx2(nCap int32, bSetContainer int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_GetCapContainerEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nCap), uintptr(bSetContainer))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapDataType(Source DTWAIN_SOURCE, nCap int32) int32 {
    theProc := d.procs["DTWAIN_GetCapDataType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nCap))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapFromName(szName uintptr) int32 {
    theProc := d.procs["DTWAIN_GetCapFromName"]
    v1, _, _ := syscall.SyscallN(theProc, szName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapFromNameA(szName string) int32 {
    theProc := d.procs["DTWAIN_GetCapFromNameA"]
    arg_0 := []byte(szName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapFromNameW(szName uintptr) int32 {
    theProc := d.procs["DTWAIN_GetCapFromNameW"]
    v1, _, _ := syscall.SyscallN(theProc, szName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapHelp(lCapability int32, lpszOut []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetCapHelp"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lCapability), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapHelpA(lCapability int32, lpszOut []byte, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetCapHelpA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lCapability), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapHelpW(lCapability int32, lpszOut []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetCapHelpW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lCapability), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapLabel(lCapability int32, lpszOut []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetCapLabel"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lCapability), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapLabelA(lCapability int32, lpszOut []byte, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetCapLabelA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lCapability), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapLabelW(lCapability int32, lpszOut []uint16, nnSize int32) int32 {
    theProc := d.procs["DTWAIN_GetCapLabelW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lCapability), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nnSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapOperations(Source DTWAIN_SOURCE, lCapability int32, lpOps *int32) int32 {
    theProc := d.procs["DTWAIN_GetCapOperations"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCapability), uintptr(unsafe.Pointer(lpOps)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapOperationsEx(Source DTWAIN_SOURCE, lCapability int32) int32 {
    theProc := d.procs["DTWAIN_GetCapOperationsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCapability))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapValues(Source DTWAIN_SOURCE, lCap int32, lGetType int32, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetCapValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCap), uintptr(lGetType), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapValuesEx(Source DTWAIN_SOURCE, lCap int32, lGetType int32, lContainerType int32, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetCapValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCap), uintptr(lGetType), uintptr(lContainerType), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCapValuesEx2(Source DTWAIN_SOURCE, lCap int32, lGetType int32, lContainerType int32, nDataType int32, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetCapValuesEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCap), uintptr(lGetType), uintptr(lContainerType), uintptr(nDataType), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCaption(Source DTWAIN_SOURCE, Caption []uint16) int32 {
    theProc := d.procs["DTWAIN_GetCaption"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Caption[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCaptionA(Source DTWAIN_SOURCE, Caption []byte) int32 {
    theProc := d.procs["DTWAIN_GetCaptionA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Caption[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCaptionW(Source DTWAIN_SOURCE, Caption []uint16) int32 {
    theProc := d.procs["DTWAIN_GetCaptionW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Caption[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCompressionSize(Source DTWAIN_SOURCE, lBytes *int32) int32 {
    theProc := d.procs["DTWAIN_GetCompressionSize"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lBytes)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCompressionType(Source DTWAIN_SOURCE, lpCompression *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetCompressionType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpCompression)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCompressionTypeEx(Source DTWAIN_SOURCE, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetCompressionTypeEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetConditionCodeString(lError int32, lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetConditionCodeString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lError), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetConditionCodeStringA(lError int32, lpszBuffer []byte, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetConditionCodeStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lError), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetConditionCodeStringW(lError int32, lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetConditionCodeStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lError), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetConstantFromTwainName(lpszBuffer uintptr) int32 {
    theProc := d.procs["DTWAIN_GetConstantFromTwainName"]
    v1, _, _ := syscall.SyscallN(theProc, lpszBuffer)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetConstantFromTwainNameA(lpszBuffer string) int32 {
    theProc := d.procs["DTWAIN_GetConstantFromTwainNameA"]
    arg_0 := []byte(lpszBuffer)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetConstantFromTwainNameW(lpszBuffer uintptr) int32 {
    theProc := d.procs["DTWAIN_GetConstantFromTwainNameW"]
    v1, _, _ := syscall.SyscallN(theProc, lpszBuffer)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetContrast(Source DTWAIN_SOURCE, Contrast *float64) int32 {
    theProc := d.procs["DTWAIN_GetContrast"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Contrast)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetContrastEx(Source DTWAIN_SOURCE) float64 {
    theProc := d.procs["DTWAIN_GetContrastEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return float64(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetContrastString(Source DTWAIN_SOURCE, Contrast []uint16) int32 {
    theProc := d.procs["DTWAIN_GetContrastString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Contrast[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetContrastStringA(Source DTWAIN_SOURCE, Contrast []byte) int32 {
    theProc := d.procs["DTWAIN_GetContrastStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Contrast[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetContrastStringW(Source DTWAIN_SOURCE, Contrast []uint16) int32 {
    theProc := d.procs["DTWAIN_GetContrastStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Contrast[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCountry() int32 {
    theProc := d.procs["DTWAIN_GetCountry"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCurrentAcquiredImage(Source DTWAIN_SOURCE) HANDLE {
    theProc := d.procs["DTWAIN_GetCurrentAcquiredImage"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCurrentFileName(Source DTWAIN_SOURCE, szName []uint16, MaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetCurrentFileName"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szName[0])), uintptr(MaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCurrentFileNameA(Source DTWAIN_SOURCE, szName []byte, MaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetCurrentFileNameA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szName[0])), uintptr(MaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCurrentFileNameW(Source DTWAIN_SOURCE, szName []uint16, MaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetCurrentFileNameW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szName[0])), uintptr(MaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCurrentPageNum(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetCurrentPageNum"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCurrentRetryCount(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetCurrentRetryCount"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCurrentTwainTriplet(pAppID LPTW_IDENTITY, pSourceID LPTW_IDENTITY, lpDG *int32, lpDAT *int32, lpMsg *int32, lpMemRef *int64) int32 {
    theProc := d.procs["DTWAIN_GetCurrentTwainTriplet"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(pAppID)), uintptr(unsafe.Pointer(pSourceID)), uintptr(unsafe.Pointer(lpDG)), uintptr(unsafe.Pointer(lpDAT)), uintptr(unsafe.Pointer(lpMsg)), uintptr(unsafe.Pointer(lpMemRef)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetCustomDSData(Source DTWAIN_SOURCE, Data []byte, dSize uint32, pActualSize *uint32, nFlags int32) HANDLE {
    theProc := d.procs["DTWAIN_GetCustomDSData"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Data[0])), uintptr(dSize), uintptr(unsafe.Pointer(pActualSize)), uintptr(nFlags))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDSMFullName(DSMType int32, szDLLName []uint16, nMaxLen int32, pWhichSearch *int32) int32 {
    theProc := d.procs["DTWAIN_GetDSMFullName"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(DSMType), uintptr(unsafe.Pointer(&szDLLName[0])), uintptr(nMaxLen), uintptr(unsafe.Pointer(pWhichSearch)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDSMFullNameA(DSMType int32, szDLLName []byte, nMaxLen int32, pWhichSearch *int32) int32 {
    theProc := d.procs["DTWAIN_GetDSMFullNameA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(DSMType), uintptr(unsafe.Pointer(&szDLLName[0])), uintptr(nMaxLen), uintptr(unsafe.Pointer(pWhichSearch)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDSMFullNameW(DSMType int32, szDLLName []uint16, nMaxLen int32, pWhichSearch *int32) int32 {
    theProc := d.procs["DTWAIN_GetDSMFullNameW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(DSMType), uintptr(unsafe.Pointer(&szDLLName[0])), uintptr(nMaxLen), uintptr(unsafe.Pointer(pWhichSearch)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDSMSearchOrder() int32 {
    theProc := d.procs["DTWAIN_GetDSMSearchOrder"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDSMSearchOrderEx(SearchOrder []uint16, UserDirectory []uint16) int32 {
    theProc := d.procs["DTWAIN_GetDSMSearchOrderEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&SearchOrder[0])), uintptr(unsafe.Pointer(&UserDirectory[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDSMSearchOrderExA(SearchOrder []byte, UserDirectory []byte) int32 {
    theProc := d.procs["DTWAIN_GetDSMSearchOrderExA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&SearchOrder[0])), uintptr(unsafe.Pointer(&UserDirectory[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDSMSearchOrderExW(SearchOrder []uint16, UserDirectory []uint16) int32 {
    theProc := d.procs["DTWAIN_GetDSMSearchOrderExW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&SearchOrder[0])), uintptr(unsafe.Pointer(&UserDirectory[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDTWAINHandle() DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_GetDTWAINHandle"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDeviceEvent(Source DTWAIN_SOURCE, lpEvent *int32) int32 {
    theProc := d.procs["DTWAIN_GetDeviceEvent"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpEvent)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDeviceEventEx(Source DTWAIN_SOURCE, lpEvent *int32, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetDeviceEventEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpEvent)), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDeviceEventInfo(Source DTWAIN_SOURCE, nWhichInfo int32, pValue LPVOID) int32 {
    theProc := d.procs["DTWAIN_GetDeviceEventInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nWhichInfo), uintptr(pValue))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDeviceNotifications(Source DTWAIN_SOURCE, DevEvents *int32) int32 {
    theProc := d.procs["DTWAIN_GetDeviceNotifications"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(DevEvents)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDeviceTimeDate(Source DTWAIN_SOURCE, szTimeDate []uint16) int32 {
    theProc := d.procs["DTWAIN_GetDeviceTimeDate"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szTimeDate[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDeviceTimeDateA(Source DTWAIN_SOURCE, szTimeDate []byte) int32 {
    theProc := d.procs["DTWAIN_GetDeviceTimeDateA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szTimeDate[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDeviceTimeDateW(Source DTWAIN_SOURCE, szTimeDate []uint16) int32 {
    theProc := d.procs["DTWAIN_GetDeviceTimeDateW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szTimeDate[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDoubleFeedDetectLength(Source DTWAIN_SOURCE, Value *float64, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetDoubleFeedDetectLength"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Value)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDoubleFeedDetectValues(Source DTWAIN_SOURCE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetDoubleFeedDetectValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDuplexType(Source DTWAIN_SOURCE, lpDupType *int32) int32 {
    theProc := d.procs["DTWAIN_GetDuplexType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpDupType)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetDuplexTypeEx(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetDuplexTypeEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetErrorBuffer(ArrayBuffer LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetErrorBuffer"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(ArrayBuffer)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetErrorBufferThreshold() int32 {
    theProc := d.procs["DTWAIN_GetErrorBufferThreshold"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetErrorCallback() DTWAIN_ERROR_PROC {
    theProc := d.procs["DTWAIN_GetErrorCallback"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_ERROR_PROC(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetErrorCallback64() DTWAIN_ERROR_PROC64 {
    theProc := d.procs["DTWAIN_GetErrorCallback64"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_ERROR_PROC64(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetErrorString(lError int32, lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetErrorString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lError), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetErrorStringA(lError int32, lpszBuffer []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetErrorStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lError), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetErrorStringW(lError int32, lpszBuffer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetErrorStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lError), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtCapFromName(szName uintptr) int32 {
    theProc := d.procs["DTWAIN_GetExtCapFromName"]
    v1, _, _ := syscall.SyscallN(theProc, szName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtCapFromNameA(szName string) int32 {
    theProc := d.procs["DTWAIN_GetExtCapFromNameA"]
    arg_0 := []byte(szName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtCapFromNameW(szName uintptr) int32 {
    theProc := d.procs["DTWAIN_GetExtCapFromNameW"]
    v1, _, _ := syscall.SyscallN(theProc, szName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtImageInfo(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetExtImageInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtImageInfoData(Source DTWAIN_SOURCE, nWhich int32, Data LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetExtImageInfoData"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nWhich), uintptr(unsafe.Pointer(Data)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtImageInfoDataEx(Source DTWAIN_SOURCE, nWhich int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_GetExtImageInfoDataEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nWhich))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtImageInfoItem(Source DTWAIN_SOURCE, nWhich int32, InfoID *int32, NumItems *int32, Type *int32) int32 {
    theProc := d.procs["DTWAIN_GetExtImageInfoItem"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nWhich), uintptr(unsafe.Pointer(InfoID)), uintptr(unsafe.Pointer(NumItems)), uintptr(unsafe.Pointer(Type)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtImageInfoItemEx(Source DTWAIN_SOURCE, nWhich int32, InfoID *int32, NumItems *int32, Type *int32, ReturnCode *int32) int32 {
    theProc := d.procs["DTWAIN_GetExtImageInfoItemEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nWhich), uintptr(unsafe.Pointer(InfoID)), uintptr(unsafe.Pointer(NumItems)), uintptr(unsafe.Pointer(Type)), uintptr(unsafe.Pointer(ReturnCode)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtNameFromCap(nValue int32, szValue []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetExtNameFromCap"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nValue), uintptr(unsafe.Pointer(&szValue[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtNameFromCapA(nValue int32, szValue []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetExtNameFromCapA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nValue), uintptr(unsafe.Pointer(&szValue[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetExtNameFromCapW(nValue int32, szValue []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetExtNameFromCapW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nValue), uintptr(unsafe.Pointer(&szValue[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFeederAlignment(Source DTWAIN_SOURCE, lpAlignment *int32) int32 {
    theProc := d.procs["DTWAIN_GetFeederAlignment"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpAlignment)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFeederFuncs(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetFeederFuncs"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFeederOrder(Source DTWAIN_SOURCE, lpOrder *int32) int32 {
    theProc := d.procs["DTWAIN_GetFeederOrder"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpOrder)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFeederWaitTime(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetFeederWaitTime"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFileCompressionType(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetFileCompressionType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFileSavePageCount(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetFileSavePageCount"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFileTypeExtensions(nType int32, lpszName []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetFileTypeExtensions"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nType), uintptr(unsafe.Pointer(&lpszName[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFileTypeExtensionsA(nType int32, lpszName []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetFileTypeExtensionsA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nType), uintptr(unsafe.Pointer(&lpszName[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFileTypeExtensionsW(nType int32, lpszName []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetFileTypeExtensionsW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nType), uintptr(unsafe.Pointer(&lpszName[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFileTypeName(nType int32, lpszName []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetFileTypeName"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nType), uintptr(unsafe.Pointer(&lpszName[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFileTypeNameA(nType int32, lpszName []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetFileTypeNameA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nType), uintptr(unsafe.Pointer(&lpszName[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetFileTypeNameW(nType int32, lpszName []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetFileTypeNameW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nType), uintptr(unsafe.Pointer(&lpszName[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetHalftone(Source DTWAIN_SOURCE, lpHalftone []uint16, GetType int32) int32 {
    theProc := d.procs["DTWAIN_GetHalftone"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&lpHalftone[0])), uintptr(GetType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetHalftoneA(Source DTWAIN_SOURCE, lpHalftone []byte, GetType int32) int32 {
    theProc := d.procs["DTWAIN_GetHalftoneA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&lpHalftone[0])), uintptr(GetType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetHalftoneW(Source DTWAIN_SOURCE, lpHalftone []uint16, GetType int32) int32 {
    theProc := d.procs["DTWAIN_GetHalftoneW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&lpHalftone[0])), uintptr(GetType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetHighlight(Source DTWAIN_SOURCE, Highlight *float64) int32 {
    theProc := d.procs["DTWAIN_GetHighlight"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Highlight)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetHighlightString(Source DTWAIN_SOURCE, Highlight []uint16) int32 {
    theProc := d.procs["DTWAIN_GetHighlightString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Highlight[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetHighlightStringA(Source DTWAIN_SOURCE, Highlight []byte) int32 {
    theProc := d.procs["DTWAIN_GetHighlightStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Highlight[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetHighlightStringW(Source DTWAIN_SOURCE, Highlight []uint16) int32 {
    theProc := d.procs["DTWAIN_GetHighlightStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Highlight[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetImageInfo(Source DTWAIN_SOURCE, lpXResolution *float64, lpYResolution *float64, lpWidth *int32, lpLength *int32, lpNumSamples *int32, lpBitsPerSample LPDTWAIN_ARRAY, lpBitsPerPixel *int32, lpPlanar *int32, lpPixelType *int32, lpCompression *int32) int32 {
    theProc := d.procs["DTWAIN_GetImageInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpXResolution)), uintptr(unsafe.Pointer(lpYResolution)), uintptr(unsafe.Pointer(lpWidth)), uintptr(unsafe.Pointer(lpLength)), uintptr(unsafe.Pointer(lpNumSamples)), uintptr(unsafe.Pointer(lpBitsPerSample)), uintptr(unsafe.Pointer(lpBitsPerPixel)), uintptr(unsafe.Pointer(lpPlanar)), uintptr(unsafe.Pointer(lpPixelType)), uintptr(unsafe.Pointer(lpCompression)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetImageInfoString(Source DTWAIN_SOURCE, lpXResolution []uint16, lpYResolution []uint16, lpWidth *int32, lpLength *int32, lpNumSamples *int32, lpBitsPerSample LPDTWAIN_ARRAY, lpBitsPerPixel *int32, lpPlanar *int32, lpPixelType *int32, lpCompression *int32) int32 {
    theProc := d.procs["DTWAIN_GetImageInfoString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&lpXResolution[0])), uintptr(unsafe.Pointer(&lpYResolution[0])), uintptr(unsafe.Pointer(lpWidth)), uintptr(unsafe.Pointer(lpLength)), uintptr(unsafe.Pointer(lpNumSamples)), uintptr(unsafe.Pointer(lpBitsPerSample)), uintptr(unsafe.Pointer(lpBitsPerPixel)), uintptr(unsafe.Pointer(lpPlanar)), uintptr(unsafe.Pointer(lpPixelType)), uintptr(unsafe.Pointer(lpCompression)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetImageInfoStringA(Source DTWAIN_SOURCE, lpXResolution []byte, lpYResolution []byte, lpWidth *int32, lpLength *int32, lpNumSamples *int32, lpBitsPerSample LPDTWAIN_ARRAY, lpBitsPerPixel *int32, lpPlanar *int32, lpPixelType *int32, lpCompression *int32) int32 {
    theProc := d.procs["DTWAIN_GetImageInfoStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&lpXResolution[0])), uintptr(unsafe.Pointer(&lpYResolution[0])), uintptr(unsafe.Pointer(lpWidth)), uintptr(unsafe.Pointer(lpLength)), uintptr(unsafe.Pointer(lpNumSamples)), uintptr(unsafe.Pointer(lpBitsPerSample)), uintptr(unsafe.Pointer(lpBitsPerPixel)), uintptr(unsafe.Pointer(lpPlanar)), uintptr(unsafe.Pointer(lpPixelType)), uintptr(unsafe.Pointer(lpCompression)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetImageInfoStringW(Source DTWAIN_SOURCE, lpXResolution []uint16, lpYResolution []uint16, lpWidth *int32, lpLength *int32, lpNumSamples *int32, lpBitsPerSample LPDTWAIN_ARRAY, lpBitsPerPixel *int32, lpPlanar *int32, lpPixelType *int32, lpCompression *int32) int32 {
    theProc := d.procs["DTWAIN_GetImageInfoStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&lpXResolution[0])), uintptr(unsafe.Pointer(&lpYResolution[0])), uintptr(unsafe.Pointer(lpWidth)), uintptr(unsafe.Pointer(lpLength)), uintptr(unsafe.Pointer(lpNumSamples)), uintptr(unsafe.Pointer(lpBitsPerSample)), uintptr(unsafe.Pointer(lpBitsPerPixel)), uintptr(unsafe.Pointer(lpPlanar)), uintptr(unsafe.Pointer(lpPixelType)), uintptr(unsafe.Pointer(lpCompression)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetJobControl(Source DTWAIN_SOURCE, pJobControl *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetJobControl"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pJobControl)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetJobControlEx(Source DTWAIN_SOURCE, bGetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetJobControlEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bGetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetJpegValues(Source DTWAIN_SOURCE, pQuality *int32, Progressive *int32) int32 {
    theProc := d.procs["DTWAIN_GetJpegValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pQuality)), uintptr(unsafe.Pointer(Progressive)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetJpegXRValues(Source DTWAIN_SOURCE, pQuality *int32, Progressive *int32) int32 {
    theProc := d.procs["DTWAIN_GetJpegXRValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pQuality)), uintptr(unsafe.Pointer(Progressive)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLanguage() int32 {
    theProc := d.procs["DTWAIN_GetLanguage"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLastError() int32 {
    theProc := d.procs["DTWAIN_GetLastError"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLibraryPath(lpszVer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetLibraryPath"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLibraryPathA(lpszVer []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetLibraryPathA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLibraryPathW(lpszVer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetLibraryPathW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLightPath(Source DTWAIN_SOURCE, lpLightPath *int32) int32 {
    theProc := d.procs["DTWAIN_GetLightPath"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpLightPath)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLightPathEx(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetLightPathEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLightSource(Source DTWAIN_SOURCE, LightSource *int32) int32 {
    theProc := d.procs["DTWAIN_GetLightSource"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(LightSource)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLightSources(Source DTWAIN_SOURCE, LightSources LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetLightSources"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(LightSources)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLightSourcesEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_GetLightSourcesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLoggerCallback() DTWAIN_LOGGER_PROC {
    theProc := d.procs["DTWAIN_GetLoggerCallback"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_LOGGER_PROC(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLoggerCallbackA() DTWAIN_LOGGER_PROCA {
    theProc := d.procs["DTWAIN_GetLoggerCallbackA"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_LOGGER_PROCA(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetLoggerCallbackW() DTWAIN_LOGGER_PROCW {
    theProc := d.procs["DTWAIN_GetLoggerCallbackW"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_LOGGER_PROCW(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetManualDuplexCount(Source DTWAIN_SOURCE, pSide1 *int32, pSide2 *int32) int32 {
    theProc := d.procs["DTWAIN_GetManualDuplexCount"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pSide1)), uintptr(unsafe.Pointer(pSide2)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetMaxAcquisitions(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetMaxAcquisitions"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetMaxBuffers(Source DTWAIN_SOURCE, pMaxBuf *int32) int32 {
    theProc := d.procs["DTWAIN_GetMaxBuffers"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pMaxBuf)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetMaxPagesToAcquire(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetMaxPagesToAcquire"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetMaxRetryAttempts(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetMaxRetryAttempts"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetNameFromCap(nCapValue int32, szValue []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetNameFromCap"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nCapValue), uintptr(unsafe.Pointer(&szValue[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetNameFromCapA(nCapValue int32, szValue []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetNameFromCapA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nCapValue), uintptr(unsafe.Pointer(&szValue[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetNameFromCapW(nCapValue int32, szValue []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetNameFromCapW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nCapValue), uintptr(unsafe.Pointer(&szValue[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetNoiseFilter(Source DTWAIN_SOURCE, lpNoiseFilter *int32) int32 {
    theProc := d.procs["DTWAIN_GetNoiseFilter"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpNoiseFilter)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetNumAcquiredImages(aAcq DTWAIN_ARRAY, nWhich int32) int32 {
    theProc := d.procs["DTWAIN_GetNumAcquiredImages"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(aAcq), uintptr(nWhich))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetNumAcquisitions(aAcq DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetNumAcquisitions"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(aAcq))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRCapValues(Engine DTWAIN_OCRENGINE, OCRCapValue int32, GetType int32, CapValues LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetOCRCapValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(OCRCapValue), uintptr(GetType), uintptr(unsafe.Pointer(CapValues)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRErrorString(Engine DTWAIN_OCRENGINE, lError int32, lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRErrorString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(lError), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRErrorStringA(Engine DTWAIN_OCRENGINE, lError int32, lpszBuffer []byte, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRErrorStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(lError), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRErrorStringW(Engine DTWAIN_OCRENGINE, lError int32, lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRErrorStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(lError), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRLastError(Engine DTWAIN_OCRENGINE) int32 {
    theProc := d.procs["DTWAIN_GetOCRLastError"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRMajorMinorVersion(Engine DTWAIN_OCRENGINE, lpMajor *int32, lpMinor *int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRMajorMinorVersion"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(lpMajor)), uintptr(unsafe.Pointer(lpMinor)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRManufacturer(Engine DTWAIN_OCRENGINE, szManufacturer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRManufacturer"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&szManufacturer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRManufacturerA(Engine DTWAIN_OCRENGINE, szManufacturer []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRManufacturerA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&szManufacturer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRManufacturerW(Engine DTWAIN_OCRENGINE, szManufacturer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRManufacturerW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&szManufacturer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRProductFamily(Engine DTWAIN_OCRENGINE, szProductFamily []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRProductFamily"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&szProductFamily[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRProductFamilyA(Engine DTWAIN_OCRENGINE, szProductFamily []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRProductFamilyA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&szProductFamily[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRProductFamilyW(Engine DTWAIN_OCRENGINE, szProductFamily []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRProductFamilyW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&szProductFamily[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRProductName(Engine DTWAIN_OCRENGINE, szProductName []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRProductName"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&szProductName[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRProductNameA(Engine DTWAIN_OCRENGINE, szProductName []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRProductNameA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&szProductName[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRProductNameW(Engine DTWAIN_OCRENGINE, szProductName []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRProductNameW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&szProductName[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRText(Engine DTWAIN_OCRENGINE, nPageNo int32, Data []uint16, dSize int32, pActualSize *int32, nFlags int32) HANDLE {
    theProc := d.procs["DTWAIN_GetOCRText"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(nPageNo), uintptr(unsafe.Pointer(&Data[0])), uintptr(dSize), uintptr(unsafe.Pointer(pActualSize)), uintptr(nFlags))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRTextA(Engine DTWAIN_OCRENGINE, nPageNo int32, Data []byte, dSize int32, pActualSize *int32, nFlags int32) HANDLE {
    theProc := d.procs["DTWAIN_GetOCRTextA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(nPageNo), uintptr(unsafe.Pointer(&Data[0])), uintptr(dSize), uintptr(unsafe.Pointer(pActualSize)), uintptr(nFlags))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRTextInfoFloat(OCRTextInfo DTWAIN_OCRTEXTINFOHANDLE, nCharPos int32, nWhichItem int32, pInfo *float64) int32 {
    theProc := d.procs["DTWAIN_GetOCRTextInfoFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(OCRTextInfo), uintptr(nCharPos), uintptr(nWhichItem), uintptr(unsafe.Pointer(pInfo)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRTextInfoFloatEx(OCRTextInfo DTWAIN_OCRTEXTINFOHANDLE, nWhichItem int32, pInfo *float64, bufSize int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRTextInfoFloatEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(OCRTextInfo), uintptr(nWhichItem), uintptr(unsafe.Pointer(pInfo)), uintptr(bufSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRTextInfoHandle(Engine DTWAIN_OCRENGINE, nPageNo int32) DTWAIN_OCRTEXTINFOHANDLE {
    theProc := d.procs["DTWAIN_GetOCRTextInfoHandle"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(nPageNo))
    return DTWAIN_OCRTEXTINFOHANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRTextInfoLong(OCRTextInfo DTWAIN_OCRTEXTINFOHANDLE, nCharPos int32, nWhichItem int32, pInfo *int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRTextInfoLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(OCRTextInfo), uintptr(nCharPos), uintptr(nWhichItem), uintptr(unsafe.Pointer(pInfo)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRTextInfoLongEx(OCRTextInfo DTWAIN_OCRTEXTINFOHANDLE, nWhichItem int32, pInfo *int32, bufSize int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRTextInfoLongEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(OCRTextInfo), uintptr(nWhichItem), uintptr(unsafe.Pointer(pInfo)), uintptr(bufSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRTextW(Engine DTWAIN_OCRENGINE, nPageNo int32, Data []uint16, dSize int32, pActualSize *int32, nFlags int32) HANDLE {
    theProc := d.procs["DTWAIN_GetOCRTextW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(nPageNo), uintptr(unsafe.Pointer(&Data[0])), uintptr(dSize), uintptr(unsafe.Pointer(pActualSize)), uintptr(nFlags))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRVersionInfo(Engine DTWAIN_OCRENGINE, buffer []uint16, maxBufSize int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRVersionInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&buffer[0])), uintptr(maxBufSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRVersionInfoA(Engine DTWAIN_OCRENGINE, buffer []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRVersionInfoA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&buffer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOCRVersionInfoW(Engine DTWAIN_OCRENGINE, buffer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetOCRVersionInfoW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(unsafe.Pointer(&buffer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOrientation(Source DTWAIN_SOURCE, lpOrient *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetOrientation"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpOrient)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOrientationEx(Source DTWAIN_SOURCE, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetOrientationEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetOverscan(Source DTWAIN_SOURCE, lpOverscan *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetOverscan"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpOverscan)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPDFTextElementFloat(TextElement DTWAIN_PDFTEXTELEMENT, val1 *float64, val2 *float64, Flags int32) int32 {
    theProc := d.procs["DTWAIN_GetPDFTextElementFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), uintptr(unsafe.Pointer(val1)), uintptr(unsafe.Pointer(val2)), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPDFTextElementLong(TextElement DTWAIN_PDFTEXTELEMENT, val1 *int32, val2 *int32, Flags int32) int32 {
    theProc := d.procs["DTWAIN_GetPDFTextElementLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), uintptr(unsafe.Pointer(val1)), uintptr(unsafe.Pointer(val2)), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPDFTextElementString(TextElement DTWAIN_PDFTEXTELEMENT, szData []uint16, maxLen int32, Flags int32) int32 {
    theProc := d.procs["DTWAIN_GetPDFTextElementString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), uintptr(unsafe.Pointer(&szData[0])), uintptr(maxLen), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPDFTextElementStringA(TextElement DTWAIN_PDFTEXTELEMENT, szData []byte, maxLen int32, Flags int32) int32 {
    theProc := d.procs["DTWAIN_GetPDFTextElementStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), uintptr(unsafe.Pointer(&szData[0])), uintptr(maxLen), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPDFTextElementStringW(TextElement DTWAIN_PDFTEXTELEMENT, szData []uint16, maxLen int32, Flags int32) int32 {
    theProc := d.procs["DTWAIN_GetPDFTextElementStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), uintptr(unsafe.Pointer(&szData[0])), uintptr(maxLen), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPDFType1FontName(FontVal int32, szFont []uint16, nChars int32) int32 {
    theProc := d.procs["DTWAIN_GetPDFType1FontName"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FontVal), uintptr(unsafe.Pointer(&szFont[0])), uintptr(nChars))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPDFType1FontNameA(FontVal int32, szFont []byte, nChars int32) int32 {
    theProc := d.procs["DTWAIN_GetPDFType1FontNameA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FontVal), uintptr(unsafe.Pointer(&szFont[0])), uintptr(nChars))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPDFType1FontNameW(FontVal int32, szFont []uint16, nChars int32) int32 {
    theProc := d.procs["DTWAIN_GetPDFType1FontNameW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(FontVal), uintptr(unsafe.Pointer(&szFont[0])), uintptr(nChars))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPaperSize(Source DTWAIN_SOURCE, lpPaperSize *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPaperSize"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpPaperSize)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPaperSizeName(paperNumber int32, outName []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetPaperSizeName"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(paperNumber), uintptr(unsafe.Pointer(&outName[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPaperSizeNameA(paperNumber int32, outName []byte, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetPaperSizeNameA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(paperNumber), uintptr(unsafe.Pointer(&outName[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPaperSizeNameW(paperNumber int32, outName []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetPaperSizeNameW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(paperNumber), uintptr(unsafe.Pointer(&outName[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPatchcodeMaxPriorities(Source DTWAIN_SOURCE, pMaxPriorities *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPatchcodeMaxPriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pMaxPriorities)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPatchcodeMaxRetries(Source DTWAIN_SOURCE, pMaxRetries *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPatchcodeMaxRetries"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pMaxRetries)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPatchcodePriorities(Source DTWAIN_SOURCE, SearchPriorities LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetPatchcodePriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(SearchPriorities)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPatchcodeSearchMode(Source DTWAIN_SOURCE, pSearchMode *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPatchcodeSearchMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pSearchMode)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPatchcodeTimeOut(Source DTWAIN_SOURCE, pTimeOut *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPatchcodeTimeOut"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pTimeOut)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPixelFlavor(Source DTWAIN_SOURCE, lpPixelFlavor *int32) int32 {
    theProc := d.procs["DTWAIN_GetPixelFlavor"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpPixelFlavor)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPixelType(Source DTWAIN_SOURCE, PixelType *int32, BitDepth *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPixelType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(PixelType)), uintptr(unsafe.Pointer(BitDepth)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinter(Source DTWAIN_SOURCE, lpPrinter *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPrinter"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpPrinter)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterEx(Source DTWAIN_SOURCE, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPrinterEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterStartNumber(Source DTWAIN_SOURCE, nStart *int32) int32 {
    theProc := d.procs["DTWAIN_GetPrinterStartNumber"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(nStart)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterStartNumberEx(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetPrinterStartNumberEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterStringMode(Source DTWAIN_SOURCE, PrinterMode *int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPrinterStringMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(PrinterMode)), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterStringModeEx(Source DTWAIN_SOURCE, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_GetPrinterStringModeEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterStrings(Source DTWAIN_SOURCE, ArrayString LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_GetPrinterStrings"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(ArrayString)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterStringsEx(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_GetPrinterStringsEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterSuffixString(Source DTWAIN_SOURCE, Suffix []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetPrinterSuffixString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Suffix[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterSuffixStringA(Source DTWAIN_SOURCE, Suffix []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetPrinterSuffixStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Suffix[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetPrinterSuffixStringW(Source DTWAIN_SOURCE, Suffix []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetPrinterSuffixStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Suffix[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetRegisteredMsg() int32 {
    theProc := d.procs["DTWAIN_GetRegisteredMsg"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetResolution(Source DTWAIN_SOURCE, Resolution *float64) int32 {
    theProc := d.procs["DTWAIN_GetResolution"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Resolution)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetResolutionEx(Source DTWAIN_SOURCE) float64 {
    theProc := d.procs["DTWAIN_GetResolutionEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return float64(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetResolutionString(Source DTWAIN_SOURCE, Resolution []uint16) int32 {
    theProc := d.procs["DTWAIN_GetResolutionString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Resolution[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetResolutionStringA(Source DTWAIN_SOURCE, Resolution []byte) int32 {
    theProc := d.procs["DTWAIN_GetResolutionStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Resolution[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetResolutionStringW(Source DTWAIN_SOURCE, Resolution []uint16) int32 {
    theProc := d.procs["DTWAIN_GetResolutionStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Resolution[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetResourceString(ResourceID int32, lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetResourceString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(ResourceID), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetResourceStringA(ResourceID int32, lpszBuffer []byte, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetResourceStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(ResourceID), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetResourceStringW(ResourceID int32, lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetResourceStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(ResourceID), uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetRotation(Source DTWAIN_SOURCE, Rotation *float64) int32 {
    theProc := d.procs["DTWAIN_GetRotation"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Rotation)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetRotationEx(Source DTWAIN_SOURCE) float64 {
    theProc := d.procs["DTWAIN_GetRotationEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return float64(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetRotationString(Source DTWAIN_SOURCE, Rotation []uint16) int32 {
    theProc := d.procs["DTWAIN_GetRotationString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Rotation[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetRotationStringA(Source DTWAIN_SOURCE, Rotation []byte) int32 {
    theProc := d.procs["DTWAIN_GetRotationStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Rotation[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetRotationStringW(Source DTWAIN_SOURCE, Rotation []uint16) int32 {
    theProc := d.procs["DTWAIN_GetRotationStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Rotation[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSaveFileName(Source DTWAIN_SOURCE, fName []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetSaveFileName"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&fName[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSaveFileNameA(Source DTWAIN_SOURCE, fName []byte, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetSaveFileNameA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&fName[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSaveFileNameW(Source DTWAIN_SOURCE, fName []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetSaveFileNameW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&fName[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSessionDetails(szBuf []uint16, nSize int32, indentFactor int32, bRefresh int32) int32 {
    theProc := d.procs["DTWAIN_GetSessionDetails"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szBuf[0])), uintptr(nSize), uintptr(indentFactor), uintptr(bRefresh))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSessionDetailsA(szBuf []byte, nSize int32, indentFactor int32, bRefresh int32) int32 {
    theProc := d.procs["DTWAIN_GetSessionDetailsA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szBuf[0])), uintptr(nSize), uintptr(indentFactor), uintptr(bRefresh))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSessionDetailsW(szBuf []uint16, nSize int32, indentFactor int32, bRefresh int32) int32 {
    theProc := d.procs["DTWAIN_GetSessionDetailsW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szBuf[0])), uintptr(nSize), uintptr(indentFactor), uintptr(bRefresh))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetShadow(Source DTWAIN_SOURCE, Shadow *float64) int32 {
    theProc := d.procs["DTWAIN_GetShadow"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Shadow)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetShadowString(Source DTWAIN_SOURCE, Shadow []uint16) int32 {
    theProc := d.procs["DTWAIN_GetShadowString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Shadow[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetShadowStringA(Source DTWAIN_SOURCE, Shadow []byte) int32 {
    theProc := d.procs["DTWAIN_GetShadowStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Shadow[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetShadowStringW(Source DTWAIN_SOURCE, Shadow []uint16) int32 {
    theProc := d.procs["DTWAIN_GetShadowStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Shadow[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetShortVersionString(lpszVer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetShortVersionString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetShortVersionStringA(lpszVer []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetShortVersionStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetShortVersionStringW(lpszVer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetShortVersionStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceAcquisitions(Source DTWAIN_SOURCE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_GetSourceAcquisitions"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceDetails(szSources uintptr, szBuf []uint16, nSize int32, indentFactor int32, bRefresh int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceDetails"]
    v1, _, _ := syscall.SyscallN(theProc, szSources, uintptr(unsafe.Pointer(&szBuf[0])), uintptr(nSize), uintptr(indentFactor), uintptr(bRefresh))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceDetailsA(szSources string, szBuf []byte, nSize int32, indentFactor int32, bRefresh int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceDetailsA"]
    arg_0 := []byte(szSources)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&szBuf[0])), uintptr(nSize), uintptr(indentFactor), uintptr(bRefresh))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceDetailsW(szSources uintptr, szBuf []uint16, nSize int32, indentFactor int32, bRefresh int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceDetailsW"]
    v1, _, _ := syscall.SyscallN(theProc, szSources, uintptr(unsafe.Pointer(&szBuf[0])), uintptr(nSize), uintptr(indentFactor), uintptr(bRefresh))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceID(Source DTWAIN_SOURCE) DTWAIN_IDENTITY {
    theProc := d.procs["DTWAIN_GetSourceID"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return DTWAIN_IDENTITY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceIDEx(Source DTWAIN_SOURCE, pIdentity LPTW_IDENTITY) TWAIN_IDENTITY {
    theProc := d.procs["DTWAIN_GetSourceIDEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pIdentity)))
    return TWAIN_IDENTITY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceManufacturer(Source DTWAIN_SOURCE, szProduct []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceManufacturer"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceManufacturerA(Source DTWAIN_SOURCE, szProduct []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceManufacturerA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceManufacturerW(Source DTWAIN_SOURCE, szProduct []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceManufacturerW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceProductFamily(Source DTWAIN_SOURCE, szProduct []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceProductFamily"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceProductFamilyA(Source DTWAIN_SOURCE, szProduct []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceProductFamilyA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceProductFamilyW(Source DTWAIN_SOURCE, szProduct []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceProductFamilyW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceProductName(Source DTWAIN_SOURCE, szProduct []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceProductName"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceProductNameA(Source DTWAIN_SOURCE, szProduct []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceProductNameA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceProductNameW(Source DTWAIN_SOURCE, szProduct []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceProductNameW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceUnit(Source DTWAIN_SOURCE, lpUnit *int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceUnit"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(lpUnit)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceUnitEx(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_GetSourceUnitEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceVersionInfo(Source DTWAIN_SOURCE, szProduct []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceVersionInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceVersionInfoA(Source DTWAIN_SOURCE, szProduct []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceVersionInfoA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceVersionInfoW(Source DTWAIN_SOURCE, szProduct []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceVersionInfoW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szProduct[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetSourceVersionNumber(Source DTWAIN_SOURCE, pMajor *int32, pMinor *int32) int32 {
    theProc := d.procs["DTWAIN_GetSourceVersionNumber"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(pMajor)), uintptr(unsafe.Pointer(pMinor)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetStaticLibVersion() int32 {
    theProc := d.procs["DTWAIN_GetStaticLibVersion"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTempFileDirectory(szFilePath []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetTempFileDirectory"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szFilePath[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTempFileDirectoryA(szFilePath []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetTempFileDirectoryA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szFilePath[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTempFileDirectoryW(szFilePath []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetTempFileDirectoryW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szFilePath[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetThreshold(Source DTWAIN_SOURCE, Threshold *float64) int32 {
    theProc := d.procs["DTWAIN_GetThreshold"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Threshold)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetThresholdString(Source DTWAIN_SOURCE, Threshold []uint16) int32 {
    theProc := d.procs["DTWAIN_GetThresholdString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Threshold[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetThresholdStringA(Source DTWAIN_SOURCE, Threshold []byte) int32 {
    theProc := d.procs["DTWAIN_GetThresholdStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Threshold[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetThresholdStringW(Source DTWAIN_SOURCE, Threshold []uint16) int32 {
    theProc := d.procs["DTWAIN_GetThresholdStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Threshold[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTimeDate(Source DTWAIN_SOURCE, szTimeDate []uint16) int32 {
    theProc := d.procs["DTWAIN_GetTimeDate"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szTimeDate[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTimeDateA(Source DTWAIN_SOURCE, szTimeDate []byte) int32 {
    theProc := d.procs["DTWAIN_GetTimeDateA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szTimeDate[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTimeDateW(Source DTWAIN_SOURCE, szTimeDate []uint16) int32 {
    theProc := d.procs["DTWAIN_GetTimeDateW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&szTimeDate[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainAppID() DTWAIN_IDENTITY {
    theProc := d.procs["DTWAIN_GetTwainAppID"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_IDENTITY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainAppIDEx(pIdentity LPTW_IDENTITY) TWAIN_IDENTITY {
    theProc := d.procs["DTWAIN_GetTwainAppIDEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(pIdentity)))
    return TWAIN_IDENTITY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainAvailability() int32 {
    theProc := d.procs["DTWAIN_GetTwainAvailability"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainAvailabilityEx(directories []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetTwainAvailabilityEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&directories[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainAvailabilityExA(szDirectories []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetTwainAvailabilityExA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szDirectories[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainAvailabilityExW(szDirectories []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetTwainAvailabilityExW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&szDirectories[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainHwnd() HWND {
    theProc := d.procs["DTWAIN_GetTwainHwnd"]
    v1, _, _ := syscall.SyscallN(theProc)
    return HWND(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainMode() int32 {
    theProc := d.procs["DTWAIN_GetTwainMode"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainNameFromConstant(lConstantType int32, lTwainConstant int32, lpszOut []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetTwainNameFromConstant"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lConstantType), uintptr(lTwainConstant), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainNameFromConstantA(lConstantType int32, lTwainConstant int32, lpszOut []byte, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetTwainNameFromConstantA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lConstantType), uintptr(lTwainConstant), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainNameFromConstantEx(lConstantType int32, lTwainConstant int32, lpszOut []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetTwainNameFromConstantEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lConstantType), uintptr(lTwainConstant), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainNameFromConstantExA(lConstantType int32, lTwainConstant int32, lpszOut []byte, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetTwainNameFromConstantExA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lConstantType), uintptr(lTwainConstant), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainNameFromConstantExW(lConstantType int32, lTwainConstant int32, lpszOut []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetTwainNameFromConstantExW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lConstantType), uintptr(lTwainConstant), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainNameFromConstantW(lConstantType int32, lTwainConstant int32, lpszOut []uint16, nSize int32) int32 {
    theProc := d.procs["DTWAIN_GetTwainNameFromConstantW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lConstantType), uintptr(lTwainConstant), uintptr(unsafe.Pointer(&lpszOut[0])), uintptr(nSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetTwainTimeout() int32 {
    theProc := d.procs["DTWAIN_GetTwainTimeout"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersion(lpMajor *int32, lpMinor *int32, lpVersionType *int32) int32 {
    theProc := d.procs["DTWAIN_GetVersion"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(lpMajor)), uintptr(unsafe.Pointer(lpMinor)), uintptr(unsafe.Pointer(lpVersionType)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionCopyright(lpszApp []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionCopyright"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszApp[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionCopyrightA(lpszApp []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionCopyrightA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszApp[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionCopyrightW(lpszApp []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionCopyrightW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszApp[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionEx(lMajor *int32, lMinor *int32, lVersionType *int32, lPatchLevel *int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(lMajor)), uintptr(unsafe.Pointer(lMinor)), uintptr(unsafe.Pointer(lVersionType)), uintptr(unsafe.Pointer(lPatchLevel)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionInfo(lpszVer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionInfoA(lpszVer []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionInfoA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionInfoW(lpszVer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionInfoW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionString(lpszVer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionStringA(lpszVer []byte, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetVersionStringW(lpszVer []uint16, nLength int32) int32 {
    theProc := d.procs["DTWAIN_GetVersionStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszVer[0])), uintptr(nLength))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetWindowsVersionInfo(lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetWindowsVersionInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetWindowsVersionInfoA(lpszBuffer []byte, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetWindowsVersionInfoA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetWindowsVersionInfoW(lpszBuffer []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_GetWindowsVersionInfoW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&lpszBuffer[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetXResolution(Source DTWAIN_SOURCE, Resolution *float64) int32 {
    theProc := d.procs["DTWAIN_GetXResolution"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Resolution)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetXResolutionString(Source DTWAIN_SOURCE, Resolution []uint16) int32 {
    theProc := d.procs["DTWAIN_GetXResolutionString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Resolution[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetXResolutionStringA(Source DTWAIN_SOURCE, Resolution []byte) int32 {
    theProc := d.procs["DTWAIN_GetXResolutionStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Resolution[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetXResolutionStringW(Source DTWAIN_SOURCE, Resolution []uint16) int32 {
    theProc := d.procs["DTWAIN_GetXResolutionStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Resolution[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetYResolution(Source DTWAIN_SOURCE, Resolution *float64) int32 {
    theProc := d.procs["DTWAIN_GetYResolution"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(Resolution)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetYResolutionString(Source DTWAIN_SOURCE, Resolution []uint16) int32 {
    theProc := d.procs["DTWAIN_GetYResolutionString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Resolution[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetYResolutionStringA(Source DTWAIN_SOURCE, Resolution []byte) int32 {
    theProc := d.procs["DTWAIN_GetYResolutionStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Resolution[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_GetYResolutionStringW(Source DTWAIN_SOURCE, Resolution []uint16) int32 {
    theProc := d.procs["DTWAIN_GetYResolutionStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&Resolution[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_InitExtImageInfo(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_InitExtImageInfo"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_InitImageFileAppend(szFile uintptr, fType int32) int32 {
    theProc := d.procs["DTWAIN_InitImageFileAppend"]
    v1, _, _ := syscall.SyscallN(theProc, szFile, uintptr(fType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_InitImageFileAppendA(szFile string, fType int32) int32 {
    theProc := d.procs["DTWAIN_InitImageFileAppendA"]
    arg_0 := []byte(szFile)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(fType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_InitImageFileAppendW(szFile uintptr, fType int32) int32 {
    theProc := d.procs["DTWAIN_InitImageFileAppendW"]
    v1, _, _ := syscall.SyscallN(theProc, szFile, uintptr(fType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_InitOCRInterface() int32 {
    theProc := d.procs["DTWAIN_InitOCRInterface"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAcquiring() int32 {
    theProc := d.procs["DTWAIN_IsAcquiring"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAudioXferSupported(Source DTWAIN_SOURCE, supportVal int32) int32 {
    theProc := d.procs["DTWAIN_IsAudioXferSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(supportVal))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoBorderDetectEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoBorderDetectEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoBorderDetectSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoBorderDetectSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoBrightEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoBrightEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoBrightSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoBrightSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoDeskewEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoDeskewEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoDeskewSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoDeskewSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoFeedEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoFeedEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoFeedSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoFeedSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoRotateEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoRotateEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoRotateSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoRotateSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutoScanEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutoScanEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutomaticSenseMediumEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutomaticSenseMediumEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsAutomaticSenseMediumSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsAutomaticSenseMediumSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsBarcodeCapsSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsBarcodeCapsSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsBarcodeDetectionEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsBarcodeDetectionEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsBarcodeSupported(Source DTWAIN_SOURCE, BarCode int32) int32 {
    theProc := d.procs["DTWAIN_IsBarcodeSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(BarCode))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsBlankPageDetectionOn(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsBlankPageDetectionOn"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsBufferedTileModeOn(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsBufferedTileModeOn"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsBufferedTileModeSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsBufferedTileModeSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsCapSupported(Source DTWAIN_SOURCE, lCapability int32) int32 {
    theProc := d.procs["DTWAIN_IsCapSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCapability))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsCompressionSupported(Source DTWAIN_SOURCE, Compression int32) int32 {
    theProc := d.procs["DTWAIN_IsCompressionSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Compression))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsCustomDSDataSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsCustomDSDataSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDIBBlank(hDib HANDLE, threshold float64) int32 {
    theProc := d.procs["DTWAIN_IsDIBBlank"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), uintptr(threshold))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDIBBlankString(hDib HANDLE, threshold uintptr) int32 {
    theProc := d.procs["DTWAIN_IsDIBBlankString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), threshold)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDIBBlankStringA(hDib HANDLE, threshold string) int32 {
    theProc := d.procs["DTWAIN_IsDIBBlankStringA"]
    arg_0 := []byte(threshold)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDIBBlankStringW(hDib HANDLE, threshold uintptr) int32 {
    theProc := d.procs["DTWAIN_IsDIBBlankStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), threshold)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDeviceEventSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsDeviceEventSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDeviceOnLine(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsDeviceOnLine"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDoubleFeedDetectLengthSupported(Source DTWAIN_SOURCE, value float64) int32 {
    theProc := d.procs["DTWAIN_IsDoubleFeedDetectLengthSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(value))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDoubleFeedDetectSupported(Source DTWAIN_SOURCE, SupportVal int32) int32 {
    theProc := d.procs["DTWAIN_IsDoubleFeedDetectSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(SupportVal))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDuplexEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsDuplexEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsDuplexSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsDuplexSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsExtImageInfoSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsExtImageInfoSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsFeederEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsFeederEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsFeederLoaded(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsFeederLoaded"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsFeederSensitive(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsFeederSensitive"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsFeederSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsFeederSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsFileSystemSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsFileSystemSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsFileXferSupported(Source DTWAIN_SOURCE, lFileType int32) int32 {
    theProc := d.procs["DTWAIN_IsFileXferSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lFileType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsGetMessageLoopDetectionOn() int32 {
    theProc := d.procs["DTWAIN_IsGetMessageLoopDetectionOn"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsGetMessageLoopEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsGetMessageLoopEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldALastPageSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldALastPageSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldALevelSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldALevelSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldAPrintFormatSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldAPrintFormatSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldAValueSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldAValueSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldBLastPageSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldBLastPageSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldBLevelSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldBLevelSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldBPrintFormatSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldBPrintFormatSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldBValueSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldBValueSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldCLastPageSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldCLastPageSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldCLevelSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldCLevelSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldCPrintFormatSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldCPrintFormatSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldCValueSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldCValueSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldDLastPageSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldDLastPageSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldDLevelSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldDLevelSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldDPrintFormatSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldDPrintFormatSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldDValueSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldDValueSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldELastPageSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldELastPageSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldELevelSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldELevelSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldEPrintFormatSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldEPrintFormatSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIAFieldEValueSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIAFieldEValueSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsImageAddressingSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsImageAddressingSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIndicatorEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIndicatorEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsIndicatorSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsIndicatorSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsInitialized() int32 {
    theProc := d.procs["DTWAIN_IsInitialized"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsJobControlSupported(Source DTWAIN_SOURCE, JobControl int32) int32 {
    theProc := d.procs["DTWAIN_IsJobControlSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(JobControl))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsLampEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsLampEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsLampSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsLampSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsLightPathSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsLightPathSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsLightSourceSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsLightSourceSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsMaxBuffersSupported(Source DTWAIN_SOURCE, MaxBuf int32) int32 {
    theProc := d.procs["DTWAIN_IsMaxBuffersSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(MaxBuf))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsMemFileXferSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsMemFileXferSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsMsgNotifyEnabled() int32 {
    theProc := d.procs["DTWAIN_IsMsgNotifyEnabled"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsNotifyTripletsEnabled() int32 {
    theProc := d.procs["DTWAIN_IsNotifyTripletsEnabled"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsOCREngineActivated(OCREngine DTWAIN_OCRENGINE) int32 {
    theProc := d.procs["DTWAIN_IsOCREngineActivated"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(OCREngine))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsOpenSourcesOnSelect() int32 {
    theProc := d.procs["DTWAIN_IsOpenSourcesOnSelect"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsOrientationSupported(Source DTWAIN_SOURCE, Orientation int32) int32 {
    theProc := d.procs["DTWAIN_IsOrientationSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Orientation))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsOverscanSupported(Source DTWAIN_SOURCE, SupportValue int32) int32 {
    theProc := d.procs["DTWAIN_IsOverscanSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(SupportValue))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsPaperDetectable(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsPaperDetectable"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsPaperSizeSupported(Source DTWAIN_SOURCE, PaperSize int32) int32 {
    theProc := d.procs["DTWAIN_IsPaperSizeSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PaperSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsPatchcodeCapsSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsPatchcodeCapsSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsPatchcodeDetectionEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsPatchcodeDetectionEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsPatchcodeSupported(Source DTWAIN_SOURCE, PatchCode int32) int32 {
    theProc := d.procs["DTWAIN_IsPatchcodeSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PatchCode))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsPeekMessageLoopEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsPeekMessageLoopEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsPixelTypeSupported(Source DTWAIN_SOURCE, PixelType int32) int32 {
    theProc := d.procs["DTWAIN_IsPixelTypeSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PixelType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsPrinterEnabled(Source DTWAIN_SOURCE, Printer int32) int32 {
    theProc := d.procs["DTWAIN_IsPrinterEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Printer))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsPrinterSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsPrinterSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsRotationSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsRotationSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsSessionEnabled() int32 {
    theProc := d.procs["DTWAIN_IsSessionEnabled"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsSkipImageInfoError(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsSkipImageInfoError"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsSourceAcquiring(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsSourceAcquiring"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsSourceAcquiringEx(Source DTWAIN_SOURCE, bUIOnly int32) int32 {
    theProc := d.procs["DTWAIN_IsSourceAcquiringEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bUIOnly))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsSourceInUIOnlyMode(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsSourceInUIOnlyMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsSourceOpen(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsSourceOpen"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsSourceSelected(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsSourceSelected"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsSourceValid(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsSourceValid"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsThumbnailEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsThumbnailEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsThumbnailSupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsThumbnailSupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsTwainAvailable() int32 {
    theProc := d.procs["DTWAIN_IsTwainAvailable"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsTwainAvailableEx(directories []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_IsTwainAvailableEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&directories[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsTwainAvailableExA(directories []byte, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_IsTwainAvailableExA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&directories[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsTwainAvailableExW(directories []uint16, nMaxLen int32) int32 {
    theProc := d.procs["DTWAIN_IsTwainAvailableExW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&directories[0])), uintptr(nMaxLen))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsUIControllable(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsUIControllable"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsUIEnabled(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsUIEnabled"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_IsUIOnlySupported(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_IsUIOnlySupported"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LoadCustomStringResources(sLangDLL uintptr) int32 {
    theProc := d.procs["DTWAIN_LoadCustomStringResources"]
    v1, _, _ := syscall.SyscallN(theProc, sLangDLL)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LoadCustomStringResourcesA(sLangDLL string) int32 {
    theProc := d.procs["DTWAIN_LoadCustomStringResourcesA"]
    arg_0 := []byte(sLangDLL)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LoadCustomStringResourcesEx(sLangDLL uintptr, bClear int32) int32 {
    theProc := d.procs["DTWAIN_LoadCustomStringResourcesEx"]
    v1, _, _ := syscall.SyscallN(theProc, sLangDLL, uintptr(bClear))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LoadCustomStringResourcesExA(sLangDLL string, bClear int32) int32 {
    theProc := d.procs["DTWAIN_LoadCustomStringResourcesExA"]
    arg_0 := []byte(sLangDLL)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(bClear))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LoadCustomStringResourcesExW(sLangDLL uintptr, bClear int32) int32 {
    theProc := d.procs["DTWAIN_LoadCustomStringResourcesExW"]
    v1, _, _ := syscall.SyscallN(theProc, sLangDLL, uintptr(bClear))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LoadCustomStringResourcesW(sLangDLL uintptr) int32 {
    theProc := d.procs["DTWAIN_LoadCustomStringResourcesW"]
    v1, _, _ := syscall.SyscallN(theProc, sLangDLL)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LoadLanguageResource(nLanguage int32) int32 {
    theProc := d.procs["DTWAIN_LoadLanguageResource"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nLanguage))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LockMemory(h HANDLE) DTWAIN_MEMORY_PTR {
    theProc := d.procs["DTWAIN_LockMemory"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(h))
    return DTWAIN_MEMORY_PTR(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LockMemoryEx(h HANDLE) DTWAIN_MEMORY_PTR {
    theProc := d.procs["DTWAIN_LockMemoryEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(h))
    return DTWAIN_MEMORY_PTR(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LogMessage(message uintptr) int32 {
    theProc := d.procs["DTWAIN_LogMessage"]
    v1, _, _ := syscall.SyscallN(theProc, message)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LogMessageA(message string) int32 {
    theProc := d.procs["DTWAIN_LogMessageA"]
    arg_0 := []byte(message)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_LogMessageW(message uintptr) int32 {
    theProc := d.procs["DTWAIN_LogMessageW"]
    v1, _, _ := syscall.SyscallN(theProc, message)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_MakeRGB(red int32, green int32, blue int32) int32 {
    theProc := d.procs["DTWAIN_MakeRGB"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(red), uintptr(green), uintptr(blue))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_OpenSource(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_OpenSource"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_OpenSourcesOnSelect(bSet int32) int32 {
    theProc := d.procs["DTWAIN_OpenSourcesOnSelect"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeCreate(nEnumType int32) DTWAIN_RANGE {
    theProc := d.procs["DTWAIN_RangeCreate"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nEnumType))
    return DTWAIN_RANGE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeCreateFromCap(Source DTWAIN_SOURCE, lCapType int32) DTWAIN_RANGE {
    theProc := d.procs["DTWAIN_RangeCreateFromCap"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCapType))
    return DTWAIN_RANGE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeDestroy(pSource DTWAIN_RANGE) int32 {
    theProc := d.procs["DTWAIN_RangeDestroy"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pSource))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeExpand(pSource DTWAIN_RANGE, pArray LPDTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_RangeExpand"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pSource), uintptr(unsafe.Pointer(pArray)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeExpandEx(Range DTWAIN_RANGE) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_RangeExpandEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Range))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetAll(pArray DTWAIN_RANGE, pVariantLow LPVOID, pVariantUp LPVOID, pVariantStep LPVOID, pVariantDefault LPVOID, pVariantCurrent LPVOID) int32 {
    theProc := d.procs["DTWAIN_RangeGetAll"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(pVariantLow), uintptr(pVariantUp), uintptr(pVariantStep), uintptr(pVariantDefault), uintptr(pVariantCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetAllFloat(pArray DTWAIN_RANGE, pVariantLow *float64, pVariantUp *float64, pVariantStep *float64, pVariantDefault *float64, pVariantCurrent *float64) int32 {
    theProc := d.procs["DTWAIN_RangeGetAllFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(pVariantLow)), uintptr(unsafe.Pointer(pVariantUp)), uintptr(unsafe.Pointer(pVariantStep)), uintptr(unsafe.Pointer(pVariantDefault)), uintptr(unsafe.Pointer(pVariantCurrent)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetAllFloatString(pArray DTWAIN_RANGE, dLow []uint16, dUp []uint16, dStep []uint16, dDefault []uint16, dCurrent []uint16) int32 {
    theProc := d.procs["DTWAIN_RangeGetAllFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&dLow[0])), uintptr(unsafe.Pointer(&dUp[0])), uintptr(unsafe.Pointer(&dStep[0])), uintptr(unsafe.Pointer(&dDefault[0])), uintptr(unsafe.Pointer(&dCurrent[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetAllFloatStringA(pArray DTWAIN_RANGE, dLow []byte, dUp []byte, dStep []byte, dDefault []byte, dCurrent []byte) int32 {
    theProc := d.procs["DTWAIN_RangeGetAllFloatStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&dLow[0])), uintptr(unsafe.Pointer(&dUp[0])), uintptr(unsafe.Pointer(&dStep[0])), uintptr(unsafe.Pointer(&dDefault[0])), uintptr(unsafe.Pointer(&dCurrent[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetAllFloatStringW(pArray DTWAIN_RANGE, dLow []uint16, dUp []uint16, dStep []uint16, dDefault []uint16, dCurrent []uint16) int32 {
    theProc := d.procs["DTWAIN_RangeGetAllFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&dLow[0])), uintptr(unsafe.Pointer(&dUp[0])), uintptr(unsafe.Pointer(&dStep[0])), uintptr(unsafe.Pointer(&dDefault[0])), uintptr(unsafe.Pointer(&dCurrent[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetAllLong(pArray DTWAIN_RANGE, pVariantLow *int32, pVariantUp *int32, pVariantStep *int32, pVariantDefault *int32, pVariantCurrent *int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetAllLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(pVariantLow)), uintptr(unsafe.Pointer(pVariantUp)), uintptr(unsafe.Pointer(pVariantStep)), uintptr(unsafe.Pointer(pVariantDefault)), uintptr(unsafe.Pointer(pVariantCurrent)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetCount(pArray DTWAIN_RANGE) int32 {
    theProc := d.procs["DTWAIN_RangeGetCount"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetExpValue(pArray DTWAIN_RANGE, lPos int32, pVariant LPVOID) int32 {
    theProc := d.procs["DTWAIN_RangeGetExpValue"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(lPos), uintptr(pVariant))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetExpValueFloat(pArray DTWAIN_RANGE, lPos int32, pVal *float64) int32 {
    theProc := d.procs["DTWAIN_RangeGetExpValueFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(lPos), uintptr(unsafe.Pointer(pVal)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetExpValueFloatString(pArray DTWAIN_RANGE, lPos int32, pVal []uint16) int32 {
    theProc := d.procs["DTWAIN_RangeGetExpValueFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(lPos), uintptr(unsafe.Pointer(&pVal[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetExpValueFloatStringA(pArray DTWAIN_RANGE, lPos int32, pVal []byte) int32 {
    theProc := d.procs["DTWAIN_RangeGetExpValueFloatStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(lPos), uintptr(unsafe.Pointer(&pVal[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetExpValueFloatStringW(pArray DTWAIN_RANGE, lPos int32, pVal []uint16) int32 {
    theProc := d.procs["DTWAIN_RangeGetExpValueFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(lPos), uintptr(unsafe.Pointer(&pVal[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetExpValueLong(pArray DTWAIN_RANGE, lPos int32, pVal *int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetExpValueLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(lPos), uintptr(unsafe.Pointer(pVal)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetNearestValue(pArray DTWAIN_RANGE, pVariantIn LPVOID, pVariantOut LPVOID, RoundType int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetNearestValue"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(pVariantIn), uintptr(pVariantOut), uintptr(RoundType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetNearestValueFloat(pArray DTWAIN_RANGE, dIn float64, pOut *float64, RoundType int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetNearestValueFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(dIn), uintptr(unsafe.Pointer(pOut)), uintptr(RoundType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetNearestValueFloatString(pArray DTWAIN_RANGE, dIn uintptr, pOut []uint16, RoundType int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetNearestValueFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), dIn, uintptr(unsafe.Pointer(&pOut[0])), uintptr(RoundType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetNearestValueFloatStringA(pArray DTWAIN_RANGE, dIn string, dOut []byte, RoundType int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetNearestValueFloatStringA"]
    arg_0 := []byte(dIn)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&dOut[0])), uintptr(RoundType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetNearestValueFloatStringW(pArray DTWAIN_RANGE, dIn uintptr, dOut []uint16, RoundType int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetNearestValueFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), dIn, uintptr(unsafe.Pointer(&dOut[0])), uintptr(RoundType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetNearestValueLong(pArray DTWAIN_RANGE, lIn int32, pOut *int32, RoundType int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetNearestValueLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(lIn), uintptr(unsafe.Pointer(pOut)), uintptr(RoundType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetPos(pArray DTWAIN_RANGE, pVariant LPVOID, pPos *int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetPos"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(pVariant), uintptr(unsafe.Pointer(pPos)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetPosFloat(pArray DTWAIN_RANGE, Val float64, pPos *int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetPosFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Val), uintptr(unsafe.Pointer(pPos)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetPosFloatString(pArray DTWAIN_RANGE, Val uintptr, pPos *int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetPosFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val, uintptr(unsafe.Pointer(pPos)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetPosFloatStringA(pArray DTWAIN_RANGE, Val string, pPos *int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetPosFloatStringA"]
    arg_0 := []byte(Val)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(pPos)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetPosFloatStringW(pArray DTWAIN_RANGE, Val uintptr, pPos *int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetPosFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), Val, uintptr(unsafe.Pointer(pPos)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetPosLong(pArray DTWAIN_RANGE, Value int32, pPos *int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetPosLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(Value), uintptr(unsafe.Pointer(pPos)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetValue(pArray DTWAIN_RANGE, nWhich int32, pVariant LPVOID) int32 {
    theProc := d.procs["DTWAIN_RangeGetValue"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(pVariant))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetValueFloat(pArray DTWAIN_RANGE, nWhich int32, pVal *float64) int32 {
    theProc := d.procs["DTWAIN_RangeGetValueFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(unsafe.Pointer(pVal)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetValueFloatString(pArray DTWAIN_RANGE, nWhich int32, pVal []uint16) int32 {
    theProc := d.procs["DTWAIN_RangeGetValueFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(unsafe.Pointer(&pVal[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetValueFloatStringA(pArray DTWAIN_RANGE, nWhich int32, dValue []byte) int32 {
    theProc := d.procs["DTWAIN_RangeGetValueFloatStringA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(unsafe.Pointer(&dValue[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetValueFloatStringW(pArray DTWAIN_RANGE, nWhich int32, dValue []uint16) int32 {
    theProc := d.procs["DTWAIN_RangeGetValueFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(unsafe.Pointer(&dValue[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeGetValueLong(pArray DTWAIN_RANGE, nWhich int32, pVal *int32) int32 {
    theProc := d.procs["DTWAIN_RangeGetValueLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(unsafe.Pointer(pVal)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeIsValid(Range DTWAIN_RANGE, pStatus *int32) int32 {
    theProc := d.procs["DTWAIN_RangeIsValid"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Range), uintptr(unsafe.Pointer(pStatus)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetAll(pArray DTWAIN_RANGE, pVariantLow LPVOID, pVariantUp LPVOID, pVariantStep LPVOID, pVariantDefault LPVOID, pVariantCurrent LPVOID) int32 {
    theProc := d.procs["DTWAIN_RangeSetAll"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(pVariantLow), uintptr(pVariantUp), uintptr(pVariantStep), uintptr(pVariantDefault), uintptr(pVariantCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetAllFloat(pArray DTWAIN_RANGE, dLow float64, dUp float64, dStep float64, dDefault float64, dCurrent float64) int32 {
    theProc := d.procs["DTWAIN_RangeSetAllFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(dLow), uintptr(dUp), uintptr(dStep), uintptr(dDefault), uintptr(dCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetAllFloatString(pArray DTWAIN_RANGE, dLow uintptr, dUp uintptr, dStep uintptr, dDefault uintptr, dCurrent uintptr) int32 {
    theProc := d.procs["DTWAIN_RangeSetAllFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), dLow, dUp, dStep, dDefault, dCurrent)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetAllFloatStringA(pArray DTWAIN_RANGE, dLow string, dUp string, dStep string, dDefault string, dCurrent string) int32 {
    theProc := d.procs["DTWAIN_RangeSetAllFloatStringA"]
    arg_0 := []byte(dLow)
    arg_1 := []byte(dUp)
    arg_2 := []byte(dStep)
    arg_3 := []byte(dDefault)
    arg_4 := []byte(dCurrent)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])), uintptr(unsafe.Pointer(&arg_3[0])), uintptr(unsafe.Pointer(&arg_4[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetAllFloatStringW(pArray DTWAIN_RANGE, dLow uintptr, dUp uintptr, dStep uintptr, dDefault uintptr, dCurrent uintptr) int32 {
    theProc := d.procs["DTWAIN_RangeSetAllFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), dLow, dUp, dStep, dDefault, dCurrent)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetAllLong(pArray DTWAIN_RANGE, lLow int32, lUp int32, lStep int32, lDefault int32, lCurrent int32) int32 {
    theProc := d.procs["DTWAIN_RangeSetAllLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(lLow), uintptr(lUp), uintptr(lStep), uintptr(lDefault), uintptr(lCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetValue(pArray DTWAIN_RANGE, nWhich int32, pVal LPVOID) int32 {
    theProc := d.procs["DTWAIN_RangeSetValue"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(pVal))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetValueFloat(pArray DTWAIN_RANGE, nWhich int32, Val float64) int32 {
    theProc := d.procs["DTWAIN_RangeSetValueFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(Val))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetValueFloatString(pArray DTWAIN_RANGE, nWhich int32, Val uintptr) int32 {
    theProc := d.procs["DTWAIN_RangeSetValueFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), Val)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetValueFloatStringA(pArray DTWAIN_RANGE, nWhich int32, dValue string) int32 {
    theProc := d.procs["DTWAIN_RangeSetValueFloatStringA"]
    arg_0 := []byte(dValue)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetValueFloatStringW(pArray DTWAIN_RANGE, nWhich int32, dValue uintptr) int32 {
    theProc := d.procs["DTWAIN_RangeSetValueFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), dValue)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RangeSetValueLong(pArray DTWAIN_RANGE, nWhich int32, Val int32) int32 {
    theProc := d.procs["DTWAIN_RangeSetValueLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(pArray), uintptr(nWhich), uintptr(Val))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RemovePDFTextElement(Source DTWAIN_SOURCE, TextElement DTWAIN_PDFTEXTELEMENT) int32 {
    theProc := d.procs["DTWAIN_RemovePDFTextElement"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(TextElement))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ResetPDFTextElement(TextElement DTWAIN_PDFTEXTELEMENT) int32 {
    theProc := d.procs["DTWAIN_ResetPDFTextElement"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RewindPage(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_RewindPage"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RotateImage(hDib HANDLE, rotationAngle float64) HANDLE {
    theProc := d.procs["DTWAIN_RotateImage"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), uintptr(rotationAngle))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RotateImageString(hDib HANDLE, rotationAngle uintptr) HANDLE {
    theProc := d.procs["DTWAIN_RotateImageString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), rotationAngle)
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RotateImageStringA(hDib HANDLE, rotationAngle string) HANDLE {
    theProc := d.procs["DTWAIN_RotateImageStringA"]
    arg_0 := []byte(rotationAngle)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), uintptr(unsafe.Pointer(&arg_0[0])))
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_RotateImageStringW(hDib HANDLE, rotationAngle uintptr) HANDLE {
    theProc := d.procs["DTWAIN_RotateImageStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hDib), rotationAngle)
    return HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectDefaultOCREngine() DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectDefaultOCREngine"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectDefaultSource() DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectDefaultSource"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectDefaultSourceWithOpen(bOpen int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectDefaultSourceWithOpen"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bOpen))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngine() DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngine"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngine2(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, nOptions int32) DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngine2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), uintptr(nOptions))
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngine2A(hWndParent HWND, szTitle string, xPos int32, yPos int32, nOptions int32) DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngine2A"]
    arg_0 := []byte(szTitle)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(xPos), uintptr(yPos), uintptr(nOptions))
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngine2Ex(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, szIncludeFilter uintptr, szExcludeFilter uintptr, szNameMapping uintptr, nOptions int32) DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngine2Ex"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), szIncludeFilter, szExcludeFilter, szNameMapping, uintptr(nOptions))
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngine2ExA(hWndParent HWND, szTitle string, xPos int32, yPos int32, szIncludeNames string, szExcludeNames string, szNameMapping string, nOptions int32) DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngine2ExA"]
    arg_0 := []byte(szTitle)
    arg_1 := []byte(szIncludeNames)
    arg_2 := []byte(szExcludeNames)
    arg_3 := []byte(szNameMapping)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(xPos), uintptr(yPos), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])), uintptr(unsafe.Pointer(&arg_3[0])), uintptr(nOptions))
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngine2ExW(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, szIncludeNames uintptr, szExcludeNames uintptr, szNameMapping uintptr, nOptions int32) DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngine2ExW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), szIncludeNames, szExcludeNames, szNameMapping, uintptr(nOptions))
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngine2W(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, nOptions int32) DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngine2W"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), uintptr(nOptions))
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngineByName(lpszName uintptr) DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngineByName"]
    v1, _, _ := syscall.SyscallN(theProc, lpszName)
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngineByNameA(lpszName string) DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngineByNameA"]
    arg_0 := []byte(lpszName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectOCREngineByNameW(lpszName uintptr) DTWAIN_OCRENGINE {
    theProc := d.procs["DTWAIN_SelectOCREngineByNameW"]
    v1, _, _ := syscall.SyscallN(theProc, lpszName)
    return DTWAIN_OCRENGINE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSource() DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSource"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSource2(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, nOptions int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSource2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), uintptr(nOptions))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSource2A(hWndParent HWND, szTitle string, xPos int32, yPos int32, nOptions int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSource2A"]
    arg_0 := []byte(szTitle)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(xPos), uintptr(yPos), uintptr(nOptions))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSource2Ex(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, szIncludeFilter uintptr, szExcludeFilter uintptr, szNameMapping uintptr, nOptions int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSource2Ex"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), szIncludeFilter, szExcludeFilter, szNameMapping, uintptr(nOptions))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSource2ExA(hWndParent HWND, szTitle string, xPos int32, yPos int32, szIncludeNames string, szExcludeNames string, szNameMapping string, nOptions int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSource2ExA"]
    arg_0 := []byte(szTitle)
    arg_1 := []byte(szIncludeNames)
    arg_2 := []byte(szExcludeNames)
    arg_3 := []byte(szNameMapping)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(xPos), uintptr(yPos), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])), uintptr(unsafe.Pointer(&arg_3[0])), uintptr(nOptions))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSource2ExW(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, szIncludeNames uintptr, szExcludeNames uintptr, szNameMapping uintptr, nOptions int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSource2ExW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), szIncludeNames, szExcludeNames, szNameMapping, uintptr(nOptions))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSource2W(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, nOptions int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSource2W"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), uintptr(nOptions))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSourceByName(lpszName uintptr) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSourceByName"]
    v1, _, _ := syscall.SyscallN(theProc, lpszName)
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSourceByNameA(lpszName string) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSourceByNameA"]
    arg_0 := []byte(lpszName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSourceByNameW(lpszName uintptr) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSourceByNameW"]
    v1, _, _ := syscall.SyscallN(theProc, lpszName)
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSourceByNameWithOpen(lpszName uintptr, bOpen int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSourceByNameWithOpen"]
    v1, _, _ := syscall.SyscallN(theProc, lpszName, uintptr(bOpen))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSourceByNameWithOpenA(lpszName string, bOpen int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSourceByNameWithOpenA"]
    arg_0 := []byte(lpszName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(bOpen))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSourceByNameWithOpenW(lpszName uintptr, bOpen int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSourceByNameWithOpenW"]
    v1, _, _ := syscall.SyscallN(theProc, lpszName, uintptr(bOpen))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SelectSourceWithOpen(bOpen int32) DTWAIN_SOURCE {
    theProc := d.procs["DTWAIN_SelectSourceWithOpen"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bOpen))
    return DTWAIN_SOURCE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireArea(Source DTWAIN_SOURCE, lSetType int32, FloatEnum DTWAIN_ARRAY, ActualEnum DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetAcquireArea"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lSetType), uintptr(FloatEnum), uintptr(ActualEnum))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireArea2(Source DTWAIN_SOURCE, left float64, top float64, right float64, bottom float64, lUnit int32, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetAcquireArea2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(left), uintptr(top), uintptr(right), uintptr(bottom), uintptr(lUnit), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireArea2String(Source DTWAIN_SOURCE, left uintptr, top uintptr, right uintptr, bottom uintptr, lUnit int32, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetAcquireArea2String"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), left, top, right, bottom, uintptr(lUnit), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireArea2StringA(Source DTWAIN_SOURCE, left string, top string, right string, bottom string, lUnit int32, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetAcquireArea2StringA"]
    arg_0 := []byte(left)
    arg_1 := []byte(top)
    arg_2 := []byte(right)
    arg_3 := []byte(bottom)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])), uintptr(unsafe.Pointer(&arg_3[0])), uintptr(lUnit), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireArea2StringW(Source DTWAIN_SOURCE, left uintptr, top uintptr, right uintptr, bottom uintptr, lUnit int32, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetAcquireArea2StringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), left, top, right, bottom, uintptr(lUnit), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireImageNegative(Source DTWAIN_SOURCE, IsNegative int32) int32 {
    theProc := d.procs["DTWAIN_SetAcquireImageNegative"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(IsNegative))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireImageScale(Source DTWAIN_SOURCE, xscale float64, yscale float64) int32 {
    theProc := d.procs["DTWAIN_SetAcquireImageScale"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(xscale), uintptr(yscale))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireImageScaleString(Source DTWAIN_SOURCE, xscale uintptr, yscale uintptr) int32 {
    theProc := d.procs["DTWAIN_SetAcquireImageScaleString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), xscale, yscale)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireImageScaleStringA(Source DTWAIN_SOURCE, xscale string, yscale string) int32 {
    theProc := d.procs["DTWAIN_SetAcquireImageScaleStringA"]
    arg_0 := []byte(xscale)
    arg_1 := []byte(yscale)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireImageScaleStringW(Source DTWAIN_SOURCE, xscale uintptr, yscale uintptr) int32 {
    theProc := d.procs["DTWAIN_SetAcquireImageScaleStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), xscale, yscale)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireStripBuffer(Source DTWAIN_SOURCE, hMem HANDLE) int32 {
    theProc := d.procs["DTWAIN_SetAcquireStripBuffer"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(hMem))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAcquireStripSize(Source DTWAIN_SOURCE, StripSize uint32) int32 {
    theProc := d.procs["DTWAIN_SetAcquireStripSize"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(StripSize))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAlarmVolume(Source DTWAIN_SOURCE, Volume int32) int32 {
    theProc := d.procs["DTWAIN_SetAlarmVolume"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Volume))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAlarms(Source DTWAIN_SOURCE, Alarms DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetAlarms"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Alarms))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAllCapsToDefault(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_SetAllCapsToDefault"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAppInfo(szVerStr uintptr, szManu uintptr, szProdFam uintptr, szProdName uintptr) int32 {
    theProc := d.procs["DTWAIN_SetAppInfo"]
    v1, _, _ := syscall.SyscallN(theProc, szVerStr, szManu, szProdFam, szProdName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAppInfoA(szVerStr string, szManu string, szProdFam string, szProdName string) int32 {
    theProc := d.procs["DTWAIN_SetAppInfoA"]
    arg_0 := []byte(szVerStr)
    arg_1 := []byte(szManu)
    arg_2 := []byte(szProdFam)
    arg_3 := []byte(szProdName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])), uintptr(unsafe.Pointer(&arg_3[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAppInfoW(szVerStr uintptr, szManu uintptr, szProdFam uintptr, szProdName uintptr) int32 {
    theProc := d.procs["DTWAIN_SetAppInfoW"]
    v1, _, _ := syscall.SyscallN(theProc, szVerStr, szManu, szProdFam, szProdName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAuthor(Source DTWAIN_SOURCE, szAuthor uintptr) int32 {
    theProc := d.procs["DTWAIN_SetAuthor"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szAuthor)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAuthorA(Source DTWAIN_SOURCE, szAuthor string) int32 {
    theProc := d.procs["DTWAIN_SetAuthorA"]
    arg_0 := []byte(szAuthor)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAuthorW(Source DTWAIN_SOURCE, szAuthor uintptr) int32 {
    theProc := d.procs["DTWAIN_SetAuthorW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szAuthor)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAvailablePrinters(Source DTWAIN_SOURCE, lpAvailPrinters int32) int32 {
    theProc := d.procs["DTWAIN_SetAvailablePrinters"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lpAvailPrinters))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetAvailablePrintersArray(Source DTWAIN_SOURCE, AvailPrinters DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetAvailablePrintersArray"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(AvailPrinters))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBarcodeMaxPriorities(Source DTWAIN_SOURCE, nMaxSearchRetries int32) int32 {
    theProc := d.procs["DTWAIN_SetBarcodeMaxPriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nMaxSearchRetries))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBarcodeMaxRetries(Source DTWAIN_SOURCE, nMaxRetries int32) int32 {
    theProc := d.procs["DTWAIN_SetBarcodeMaxRetries"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nMaxRetries))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBarcodePriorities(Source DTWAIN_SOURCE, SearchPriorities DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetBarcodePriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(SearchPriorities))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBarcodeSearchMode(Source DTWAIN_SOURCE, nSearchMode int32) int32 {
    theProc := d.procs["DTWAIN_SetBarcodeSearchMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nSearchMode))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBarcodeTimeOut(Source DTWAIN_SOURCE, TimeOutValue int32) int32 {
    theProc := d.procs["DTWAIN_SetBarcodeTimeOut"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(TimeOutValue))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBitDepth(Source DTWAIN_SOURCE, BitDepth int32, bSetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetBitDepth"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(BitDepth), uintptr(bSetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBlankPageDetection(Source DTWAIN_SOURCE, threshold float64, discard_option int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetBlankPageDetection"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(threshold), uintptr(discard_option), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBlankPageDetectionEx(Source DTWAIN_SOURCE, threshold float64, autodetect int32, detectOpts int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetBlankPageDetectionEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(threshold), uintptr(autodetect), uintptr(detectOpts), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBlankPageDetectionExString(Source DTWAIN_SOURCE, threshold uintptr, autodetect_option int32, detectOpts int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetBlankPageDetectionExString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), threshold, uintptr(autodetect_option), uintptr(detectOpts), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBlankPageDetectionExStringA(Source DTWAIN_SOURCE, threshold string, autodetect_option int32, detectOpts int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetBlankPageDetectionExStringA"]
    arg_0 := []byte(threshold)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(autodetect_option), uintptr(detectOpts), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBlankPageDetectionExStringW(Source DTWAIN_SOURCE, threshold uintptr, autodetect_option int32, detectOpts int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetBlankPageDetectionExStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), threshold, uintptr(autodetect_option), uintptr(detectOpts), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBlankPageDetectionString(Source DTWAIN_SOURCE, threshold uintptr, autodetect_option int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetBlankPageDetectionString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), threshold, uintptr(autodetect_option), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBlankPageDetectionStringA(Source DTWAIN_SOURCE, threshold string, autodetect_option int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetBlankPageDetectionStringA"]
    arg_0 := []byte(threshold)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(autodetect_option), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBlankPageDetectionStringW(Source DTWAIN_SOURCE, threshold uintptr, autodetect_option int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetBlankPageDetectionStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), threshold, uintptr(autodetect_option), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBrightness(Source DTWAIN_SOURCE, Brightness float64) int32 {
    theProc := d.procs["DTWAIN_SetBrightness"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Brightness))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBrightnessString(Source DTWAIN_SOURCE, Brightness uintptr) int32 {
    theProc := d.procs["DTWAIN_SetBrightnessString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Brightness)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBrightnessStringA(Source DTWAIN_SOURCE, Contrast string) int32 {
    theProc := d.procs["DTWAIN_SetBrightnessStringA"]
    arg_0 := []byte(Contrast)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBrightnessStringW(Source DTWAIN_SOURCE, Contrast uintptr) int32 {
    theProc := d.procs["DTWAIN_SetBrightnessStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Contrast)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetBufferedTileMode(Source DTWAIN_SOURCE, bTileMode int32) int32 {
    theProc := d.procs["DTWAIN_SetBufferedTileMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bTileMode))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCallback(Fn DTWAIN_CALLBACK_PROC, UserData int32) DTWAIN_CALLBACK_PROC {
    theProc := d.procs["DTWAIN_SetCallback"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Fn), uintptr(UserData))
    return DTWAIN_CALLBACK_PROC(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCallback64(Fn DTWAIN_CALLBACK_PROC64, UserData int64) DTWAIN_CALLBACK_PROC64 {
    theProc := d.procs["DTWAIN_SetCallback64"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Fn), uintptr(UserData))
    return DTWAIN_CALLBACK_PROC64(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCamera(Source DTWAIN_SOURCE, szCamera uintptr) int32 {
    theProc := d.procs["DTWAIN_SetCamera"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szCamera)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCameraA(Source DTWAIN_SOURCE, szCamera string) int32 {
    theProc := d.procs["DTWAIN_SetCameraA"]
    arg_0 := []byte(szCamera)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCameraW(Source DTWAIN_SOURCE, szCamera uintptr) int32 {
    theProc := d.procs["DTWAIN_SetCameraW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szCamera)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCapValues(Source DTWAIN_SOURCE, lCap int32, lSetType int32, pArray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetCapValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCap), uintptr(lSetType), uintptr(pArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCapValuesEx(Source DTWAIN_SOURCE, lCap int32, lSetType int32, lContainerType int32, pArray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetCapValuesEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCap), uintptr(lSetType), uintptr(lContainerType), uintptr(pArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCapValuesEx2(Source DTWAIN_SOURCE, lCap int32, lSetType int32, lContainerType int32, nDataType int32, pArray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetCapValuesEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCap), uintptr(lSetType), uintptr(lContainerType), uintptr(nDataType), uintptr(pArray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCaption(Source DTWAIN_SOURCE, Caption uintptr) int32 {
    theProc := d.procs["DTWAIN_SetCaption"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Caption)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCaptionA(Source DTWAIN_SOURCE, Caption string) int32 {
    theProc := d.procs["DTWAIN_SetCaptionA"]
    arg_0 := []byte(Caption)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCaptionW(Source DTWAIN_SOURCE, Caption uintptr) int32 {
    theProc := d.procs["DTWAIN_SetCaptionW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Caption)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCompressionType(Source DTWAIN_SOURCE, lCompression int32, bSetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetCompressionType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCompression), uintptr(bSetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetContrast(Source DTWAIN_SOURCE, Contrast float64) int32 {
    theProc := d.procs["DTWAIN_SetContrast"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Contrast))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetContrastString(Source DTWAIN_SOURCE, Contrast uintptr) int32 {
    theProc := d.procs["DTWAIN_SetContrastString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Contrast)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetContrastStringA(Source DTWAIN_SOURCE, Contrast string) int32 {
    theProc := d.procs["DTWAIN_SetContrastStringA"]
    arg_0 := []byte(Contrast)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetContrastStringW(Source DTWAIN_SOURCE, Contrast uintptr) int32 {
    theProc := d.procs["DTWAIN_SetContrastStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Contrast)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCountry(nCountry int32) int32 {
    theProc := d.procs["DTWAIN_SetCountry"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nCountry))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCurrentRetryCount(Source DTWAIN_SOURCE, nCount int32) int32 {
    theProc := d.procs["DTWAIN_SetCurrentRetryCount"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nCount))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetCustomDSData(Source DTWAIN_SOURCE, hData HANDLE, Data []byte, dSize uint32, nFlags int32) int32 {
    theProc := d.procs["DTWAIN_SetCustomDSData"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(hData), uintptr(unsafe.Pointer(&Data[0])), uintptr(dSize), uintptr(nFlags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDSMSearchOrder(SearchPath int32) int32 {
    theProc := d.procs["DTWAIN_SetDSMSearchOrder"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(SearchPath))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDSMSearchOrderEx(SearchOrder uintptr, UserPath uintptr) int32 {
    theProc := d.procs["DTWAIN_SetDSMSearchOrderEx"]
    v1, _, _ := syscall.SyscallN(theProc, SearchOrder, UserPath)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDSMSearchOrderExA(SearchOrder string, szUserPath string) int32 {
    theProc := d.procs["DTWAIN_SetDSMSearchOrderExA"]
    arg_0 := []byte(SearchOrder)
    arg_1 := []byte(szUserPath)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDSMSearchOrderExW(SearchOrder uintptr, szUserPath uintptr) int32 {
    theProc := d.procs["DTWAIN_SetDSMSearchOrderExW"]
    v1, _, _ := syscall.SyscallN(theProc, SearchOrder, szUserPath)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDefaultSource(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_SetDefaultSource"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDeviceNotifications(Source DTWAIN_SOURCE, DevEvents int32) int32 {
    theProc := d.procs["DTWAIN_SetDeviceNotifications"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(DevEvents))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDeviceTimeDate(Source DTWAIN_SOURCE, szTimeDate uintptr) int32 {
    theProc := d.procs["DTWAIN_SetDeviceTimeDate"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szTimeDate)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDeviceTimeDateA(Source DTWAIN_SOURCE, szTimeDate string) int32 {
    theProc := d.procs["DTWAIN_SetDeviceTimeDateA"]
    arg_0 := []byte(szTimeDate)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDeviceTimeDateW(Source DTWAIN_SOURCE, szTimeDate uintptr) int32 {
    theProc := d.procs["DTWAIN_SetDeviceTimeDateW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szTimeDate)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDoubleFeedDetectLength(Source DTWAIN_SOURCE, Value float64) int32 {
    theProc := d.procs["DTWAIN_SetDoubleFeedDetectLength"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Value))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDoubleFeedDetectLengthString(Source DTWAIN_SOURCE, value uintptr) int32 {
    theProc := d.procs["DTWAIN_SetDoubleFeedDetectLengthString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), value)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDoubleFeedDetectLengthStringA(Source DTWAIN_SOURCE, szLength string) int32 {
    theProc := d.procs["DTWAIN_SetDoubleFeedDetectLengthStringA"]
    arg_0 := []byte(szLength)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDoubleFeedDetectLengthStringW(Source DTWAIN_SOURCE, szLength uintptr) int32 {
    theProc := d.procs["DTWAIN_SetDoubleFeedDetectLengthStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szLength)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDoubleFeedDetectValues(Source DTWAIN_SOURCE, prray DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetDoubleFeedDetectValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(prray))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetDoublePageCountOnDuplex(Source DTWAIN_SOURCE, bDoubleCount int32) int32 {
    theProc := d.procs["DTWAIN_SetDoublePageCountOnDuplex"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bDoubleCount))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetEOJDetectValue(Source DTWAIN_SOURCE, nValue int32) int32 {
    theProc := d.procs["DTWAIN_SetEOJDetectValue"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nValue))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetErrorBufferThreshold(nErrors int32) int32 {
    theProc := d.procs["DTWAIN_SetErrorBufferThreshold"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nErrors))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetErrorCallback(proc DTWAIN_ERROR_PROC, UserData int32) int32 {
    theProc := d.procs["DTWAIN_SetErrorCallback"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(proc), uintptr(UserData))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetErrorCallback64(proc DTWAIN_ERROR_PROC64, UserData64 int64) int32 {
    theProc := d.procs["DTWAIN_SetErrorCallback64"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(proc), uintptr(UserData64))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetFeederAlignment(Source DTWAIN_SOURCE, lpAlignment int32) int32 {
    theProc := d.procs["DTWAIN_SetFeederAlignment"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lpAlignment))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetFeederOrder(Source DTWAIN_SOURCE, lOrder int32) int32 {
    theProc := d.procs["DTWAIN_SetFeederOrder"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lOrder))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetFeederWaitTime(Source DTWAIN_SOURCE, waitTime int32, flags int32) int32 {
    theProc := d.procs["DTWAIN_SetFeederWaitTime"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(waitTime), uintptr(flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetFileAutoIncrement(Source DTWAIN_SOURCE, Increment int32, bResetOnAcquire int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetFileAutoIncrement"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Increment), uintptr(bResetOnAcquire), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetFileCompressionType(Source DTWAIN_SOURCE, lCompression int32, bIsCustom int32) int32 {
    theProc := d.procs["DTWAIN_SetFileCompressionType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCompression), uintptr(bIsCustom))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetFileSavePos(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, nFlags int32) int32 {
    theProc := d.procs["DTWAIN_SetFileSavePos"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), uintptr(nFlags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetFileSavePosA(hWndParent HWND, szTitle string, xPos int32, yPos int32, nFlags int32) int32 {
    theProc := d.procs["DTWAIN_SetFileSavePosA"]
    arg_0 := []byte(szTitle)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(xPos), uintptr(yPos), uintptr(nFlags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetFileSavePosW(hWndParent HWND, szTitle uintptr, xPos int32, yPos int32, nFlags int32) int32 {
    theProc := d.procs["DTWAIN_SetFileSavePosW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndParent), szTitle, uintptr(xPos), uintptr(yPos), uintptr(nFlags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetFileXferFormat(Source DTWAIN_SOURCE, lFileType int32, bSetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetFileXferFormat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lFileType), uintptr(bSetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetHalftone(Source DTWAIN_SOURCE, lpHalftone uintptr) int32 {
    theProc := d.procs["DTWAIN_SetHalftone"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpHalftone)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetHalftoneA(Source DTWAIN_SOURCE, lpHalftone string) int32 {
    theProc := d.procs["DTWAIN_SetHalftoneA"]
    arg_0 := []byte(lpHalftone)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetHalftoneW(Source DTWAIN_SOURCE, lpHalftone uintptr) int32 {
    theProc := d.procs["DTWAIN_SetHalftoneW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpHalftone)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetHighlight(Source DTWAIN_SOURCE, Highlight float64) int32 {
    theProc := d.procs["DTWAIN_SetHighlight"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Highlight))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetHighlightString(Source DTWAIN_SOURCE, Highlight uintptr) int32 {
    theProc := d.procs["DTWAIN_SetHighlightString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Highlight)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetHighlightStringA(Source DTWAIN_SOURCE, Highlight string) int32 {
    theProc := d.procs["DTWAIN_SetHighlightStringA"]
    arg_0 := []byte(Highlight)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetHighlightStringW(Source DTWAIN_SOURCE, Highlight uintptr) int32 {
    theProc := d.procs["DTWAIN_SetHighlightStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Highlight)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetJobControl(Source DTWAIN_SOURCE, JobControl int32, bSetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetJobControl"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(JobControl), uintptr(bSetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetJpegValues(Source DTWAIN_SOURCE, Quality int32, Progressive int32) int32 {
    theProc := d.procs["DTWAIN_SetJpegValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Quality), uintptr(Progressive))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetJpegXRValues(Source DTWAIN_SOURCE, Quality int32, Progressive int32) int32 {
    theProc := d.procs["DTWAIN_SetJpegXRValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Quality), uintptr(Progressive))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLanguage(nLanguage int32) int32 {
    theProc := d.procs["DTWAIN_SetLanguage"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nLanguage))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLastError(nError int32) int32 {
    theProc := d.procs["DTWAIN_SetLastError"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(nError))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLightPath(Source DTWAIN_SOURCE, LightPath int32) int32 {
    theProc := d.procs["DTWAIN_SetLightPath"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(LightPath))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLightPathEx(Source DTWAIN_SOURCE, LightPaths DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetLightPathEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(LightPaths))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLightSource(Source DTWAIN_SOURCE, LightSource int32) int32 {
    theProc := d.procs["DTWAIN_SetLightSource"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(LightSource))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLightSources(Source DTWAIN_SOURCE, LightSources DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetLightSources"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(LightSources))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLogSaveThreshold(lineCount int64) int32 {
    theProc := d.procs["DTWAIN_SetLogSaveThreshold"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lineCount))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLoggerCallback(logProc DTWAIN_LOGGER_PROC, UserData int64) int32 {
    theProc := d.procs["DTWAIN_SetLoggerCallback"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(logProc), uintptr(UserData))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLoggerCallbackA(logProc DTWAIN_LOGGER_PROCA, UserData int64) int32 {
    theProc := d.procs["DTWAIN_SetLoggerCallbackA"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(logProc), uintptr(UserData))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetLoggerCallbackW(logProc DTWAIN_LOGGER_PROCW, UserData int64) int32 {
    theProc := d.procs["DTWAIN_SetLoggerCallbackW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(logProc), uintptr(UserData))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetManualDuplexMode(Source DTWAIN_SOURCE, Flags int32, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetManualDuplexMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Flags), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetMaxAcquisitions(Source DTWAIN_SOURCE, MaxAcquires int32) int32 {
    theProc := d.procs["DTWAIN_SetMaxAcquisitions"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(MaxAcquires))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetMaxBuffers(Source DTWAIN_SOURCE, MaxBuf int32) int32 {
    theProc := d.procs["DTWAIN_SetMaxBuffers"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(MaxBuf))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetMaxRetryAttempts(Source DTWAIN_SOURCE, nAttempts int32) int32 {
    theProc := d.procs["DTWAIN_SetMaxRetryAttempts"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nAttempts))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetMultipageScanMode(Source DTWAIN_SOURCE, ScanType int32) int32 {
    theProc := d.procs["DTWAIN_SetMultipageScanMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(ScanType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetNoiseFilter(Source DTWAIN_SOURCE, NoiseFilter int32) int32 {
    theProc := d.procs["DTWAIN_SetNoiseFilter"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(NoiseFilter))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetOCRCapValues(Engine DTWAIN_OCRENGINE, OCRCapValue int32, SetType int32, CapValues DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetOCRCapValues"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(OCRCapValue), uintptr(SetType), uintptr(CapValues))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetOrientation(Source DTWAIN_SOURCE, Orient int32, bSetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetOrientation"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Orient), uintptr(bSetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetOverscan(Source DTWAIN_SOURCE, Value int32, bSetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetOverscan"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Value), uintptr(bSetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFAESEncryption(Source DTWAIN_SOURCE, nWhichEncryption int32, bUseAES int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFAESEncryption"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nWhichEncryption), uintptr(bUseAES))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFASCIICompression(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFASCIICompression"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFAuthor(Source DTWAIN_SOURCE, lpAuthor uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFAuthor"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpAuthor)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFAuthorA(Source DTWAIN_SOURCE, lpAuthor string) int32 {
    theProc := d.procs["DTWAIN_SetPDFAuthorA"]
    arg_0 := []byte(lpAuthor)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFAuthorW(Source DTWAIN_SOURCE, lpAuthor uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFAuthorW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpAuthor)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFCompression(Source DTWAIN_SOURCE, bCompression int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFCompression"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bCompression))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFCreator(Source DTWAIN_SOURCE, lpCreator uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFCreator"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpCreator)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFCreatorA(Source DTWAIN_SOURCE, lpCreator string) int32 {
    theProc := d.procs["DTWAIN_SetPDFCreatorA"]
    arg_0 := []byte(lpCreator)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFCreatorW(Source DTWAIN_SOURCE, lpCreator uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFCreatorW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpCreator)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFEncryption(Source DTWAIN_SOURCE, bUseEncryption int32, lpszUser uintptr, lpszOwner uintptr, Permissions uint32, UseStrongEncryption int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFEncryption"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bUseEncryption), lpszUser, lpszOwner, uintptr(Permissions), uintptr(UseStrongEncryption))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFEncryptionA(Source DTWAIN_SOURCE, bUseEncryption int32, lpszUser string, lpszOwner string, Permissions uint32, UseStrongEncryption int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFEncryptionA"]
    arg_0 := []byte(lpszUser)
    arg_1 := []byte(lpszOwner)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bUseEncryption), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(Permissions), uintptr(UseStrongEncryption))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFEncryptionW(Source DTWAIN_SOURCE, bUseEncryption int32, lpszUser uintptr, lpszOwner uintptr, Permissions uint32, UseStrongEncryption int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFEncryptionW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bUseEncryption), lpszUser, lpszOwner, uintptr(Permissions), uintptr(UseStrongEncryption))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFJpegQuality(Source DTWAIN_SOURCE, Quality int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFJpegQuality"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Quality))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFKeywords(Source DTWAIN_SOURCE, lpKeyWords uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFKeywords"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpKeyWords)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFKeywordsA(Source DTWAIN_SOURCE, lpKeyWords string) int32 {
    theProc := d.procs["DTWAIN_SetPDFKeywordsA"]
    arg_0 := []byte(lpKeyWords)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFKeywordsW(Source DTWAIN_SOURCE, lpKeyWords uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFKeywordsW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpKeyWords)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFOCRConversion(Engine DTWAIN_OCRENGINE, PageType int32, FileType int32, PixelType int32, BitDepth int32, Options int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFOCRConversion"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Engine), uintptr(PageType), uintptr(FileType), uintptr(PixelType), uintptr(BitDepth), uintptr(Options))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFOCRMode(Source DTWAIN_SOURCE, bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFOCRMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFOrientation(Source DTWAIN_SOURCE, lPOrientation int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFOrientation"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lPOrientation))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFPageScale(Source DTWAIN_SOURCE, nOptions int32, xScale float64, yScale float64) int32 {
    theProc := d.procs["DTWAIN_SetPDFPageScale"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nOptions), uintptr(xScale), uintptr(yScale))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFPageScaleString(Source DTWAIN_SOURCE, nOptions int32, xScale uintptr, yScale uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFPageScaleString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nOptions), xScale, yScale)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFPageScaleStringA(Source DTWAIN_SOURCE, nOptions int32, xScale string, yScale string) int32 {
    theProc := d.procs["DTWAIN_SetPDFPageScaleStringA"]
    arg_0 := []byte(xScale)
    arg_1 := []byte(yScale)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nOptions), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFPageScaleStringW(Source DTWAIN_SOURCE, nOptions int32, xScale uintptr, yScale uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFPageScaleStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nOptions), xScale, yScale)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFPageSize(Source DTWAIN_SOURCE, PageSize int32, CustomWidth float64, CustomHeight float64) int32 {
    theProc := d.procs["DTWAIN_SetPDFPageSize"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PageSize), uintptr(CustomWidth), uintptr(CustomHeight))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFPageSizeString(Source DTWAIN_SOURCE, PageSize int32, CustomWidth uintptr, CustomHeight uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFPageSizeString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PageSize), CustomWidth, CustomHeight)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFPageSizeStringA(Source DTWAIN_SOURCE, PageSize int32, CustomWidth string, CustomHeight string) int32 {
    theProc := d.procs["DTWAIN_SetPDFPageSizeStringA"]
    arg_0 := []byte(CustomWidth)
    arg_1 := []byte(CustomHeight)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PageSize), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFPageSizeStringW(Source DTWAIN_SOURCE, PageSize int32, CustomWidth uintptr, CustomHeight uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFPageSizeStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PageSize), CustomWidth, CustomHeight)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFPolarity(Source DTWAIN_SOURCE, Polarity int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFPolarity"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Polarity))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFProducer(Source DTWAIN_SOURCE, lpProducer uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFProducer"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpProducer)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFProducerA(Source DTWAIN_SOURCE, lpProducer string) int32 {
    theProc := d.procs["DTWAIN_SetPDFProducerA"]
    arg_0 := []byte(lpProducer)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFProducerW(Source DTWAIN_SOURCE, lpProducer uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFProducerW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpProducer)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFSubject(Source DTWAIN_SOURCE, lpSubject uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFSubject"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpSubject)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFSubjectA(Source DTWAIN_SOURCE, lpSubject string) int32 {
    theProc := d.procs["DTWAIN_SetPDFSubjectA"]
    arg_0 := []byte(lpSubject)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFSubjectW(Source DTWAIN_SOURCE, lpSubject uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFSubjectW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpSubject)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTextElementFloat(TextElement DTWAIN_PDFTEXTELEMENT, val1 float64, val2 float64, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFTextElementFloat"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), uintptr(val1), uintptr(val2), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTextElementFloatString(TextElement DTWAIN_PDFTEXTELEMENT, val1 uintptr, val2 uintptr, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFTextElementFloatString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), val1, val2, uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTextElementFloatStringA(TextElement DTWAIN_PDFTEXTELEMENT, val1 string, val2 string, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFTextElementFloatStringA"]
    arg_0 := []byte(val1)
    arg_1 := []byte(val2)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTextElementFloatStringW(TextElement DTWAIN_PDFTEXTELEMENT, val1 uintptr, val2 uintptr, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFTextElementFloatStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), val1, val2, uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTextElementLong(TextElement DTWAIN_PDFTEXTELEMENT, val1 int32, val2 int32, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFTextElementLong"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), uintptr(val1), uintptr(val2), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTextElementString(TextElement DTWAIN_PDFTEXTELEMENT, val1 uintptr, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFTextElementString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), val1, uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTextElementStringA(TextElement DTWAIN_PDFTEXTELEMENT, szString string, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFTextElementStringA"]
    arg_0 := []byte(szString)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTextElementStringW(TextElement DTWAIN_PDFTEXTELEMENT, szString uintptr, Flags int32) int32 {
    theProc := d.procs["DTWAIN_SetPDFTextElementStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(TextElement), szString, uintptr(Flags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTitle(Source DTWAIN_SOURCE, lpTitle uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFTitle"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpTitle)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTitleA(Source DTWAIN_SOURCE, lpTitle string) int32 {
    theProc := d.procs["DTWAIN_SetPDFTitleA"]
    arg_0 := []byte(lpTitle)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPDFTitleW(Source DTWAIN_SOURCE, lpTitle uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPDFTitleW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), lpTitle)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPaperSize(Source DTWAIN_SOURCE, PaperSize int32, bSetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetPaperSize"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PaperSize), uintptr(bSetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPatchcodeMaxPriorities(Source DTWAIN_SOURCE, nMaxSearchRetries int32) int32 {
    theProc := d.procs["DTWAIN_SetPatchcodeMaxPriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nMaxSearchRetries))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPatchcodeMaxRetries(Source DTWAIN_SOURCE, nMaxRetries int32) int32 {
    theProc := d.procs["DTWAIN_SetPatchcodeMaxRetries"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nMaxRetries))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPatchcodePriorities(Source DTWAIN_SOURCE, SearchPriorities DTWAIN_ARRAY) int32 {
    theProc := d.procs["DTWAIN_SetPatchcodePriorities"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(SearchPriorities))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPatchcodeSearchMode(Source DTWAIN_SOURCE, nSearchMode int32) int32 {
    theProc := d.procs["DTWAIN_SetPatchcodeSearchMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nSearchMode))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPatchcodeTimeOut(Source DTWAIN_SOURCE, TimeOutValue int32) int32 {
    theProc := d.procs["DTWAIN_SetPatchcodeTimeOut"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(TimeOutValue))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPixelFlavor(Source DTWAIN_SOURCE, PixelFlavor int32) int32 {
    theProc := d.procs["DTWAIN_SetPixelFlavor"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PixelFlavor))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPixelType(Source DTWAIN_SOURCE, PixelType int32, BitDepth int32, bSetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetPixelType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PixelType), uintptr(BitDepth), uintptr(bSetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPostScriptTitle(Source DTWAIN_SOURCE, szTitle uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPostScriptTitle"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szTitle)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPostScriptTitleA(Source DTWAIN_SOURCE, szTitle string) int32 {
    theProc := d.procs["DTWAIN_SetPostScriptTitleA"]
    arg_0 := []byte(szTitle)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPostScriptTitleW(Source DTWAIN_SOURCE, szTitle uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPostScriptTitleW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), szTitle)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPostScriptType(Source DTWAIN_SOURCE, PSType int32) int32 {
    theProc := d.procs["DTWAIN_SetPostScriptType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PSType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPrinter(Source DTWAIN_SOURCE, Printer int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetPrinter"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Printer), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPrinterEx(Source DTWAIN_SOURCE, Printer int32, bCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetPrinterEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Printer), uintptr(bCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPrinterStartNumber(Source DTWAIN_SOURCE, nStart int32) int32 {
    theProc := d.procs["DTWAIN_SetPrinterStartNumber"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(nStart))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPrinterStringMode(Source DTWAIN_SOURCE, PrinterMode int32, bSetCurrent int32) int32 {
    theProc := d.procs["DTWAIN_SetPrinterStringMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(PrinterMode), uintptr(bSetCurrent))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPrinterStrings(Source DTWAIN_SOURCE, ArrayString DTWAIN_ARRAY, pNumStrings *int32) int32 {
    theProc := d.procs["DTWAIN_SetPrinterStrings"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(ArrayString), uintptr(unsafe.Pointer(pNumStrings)))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPrinterSuffixString(Source DTWAIN_SOURCE, Suffix uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPrinterSuffixString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Suffix)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPrinterSuffixStringA(Source DTWAIN_SOURCE, Suffix string) int32 {
    theProc := d.procs["DTWAIN_SetPrinterSuffixStringA"]
    arg_0 := []byte(Suffix)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetPrinterSuffixStringW(Source DTWAIN_SOURCE, Suffix uintptr) int32 {
    theProc := d.procs["DTWAIN_SetPrinterSuffixStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Suffix)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetQueryCapSupport(bSet int32) int32 {
    theProc := d.procs["DTWAIN_SetQueryCapSupport"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetResolution(Source DTWAIN_SOURCE, Resolution float64) int32 {
    theProc := d.procs["DTWAIN_SetResolution"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Resolution))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetResolutionString(Source DTWAIN_SOURCE, Resolution uintptr) int32 {
    theProc := d.procs["DTWAIN_SetResolutionString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Resolution)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetResolutionStringA(Source DTWAIN_SOURCE, Resolution string) int32 {
    theProc := d.procs["DTWAIN_SetResolutionStringA"]
    arg_0 := []byte(Resolution)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetResolutionStringW(Source DTWAIN_SOURCE, Resolution uintptr) int32 {
    theProc := d.procs["DTWAIN_SetResolutionStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Resolution)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetResourcePath(ResourcePath uintptr) int32 {
    theProc := d.procs["DTWAIN_SetResourcePath"]
    v1, _, _ := syscall.SyscallN(theProc, ResourcePath)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetResourcePathA(ResourcePath string) int32 {
    theProc := d.procs["DTWAIN_SetResourcePathA"]
    arg_0 := []byte(ResourcePath)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetResourcePathW(ResourcePath uintptr) int32 {
    theProc := d.procs["DTWAIN_SetResourcePathW"]
    v1, _, _ := syscall.SyscallN(theProc, ResourcePath)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetRotation(Source DTWAIN_SOURCE, Rotation float64) int32 {
    theProc := d.procs["DTWAIN_SetRotation"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Rotation))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetRotationString(Source DTWAIN_SOURCE, Rotation uintptr) int32 {
    theProc := d.procs["DTWAIN_SetRotationString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Rotation)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetRotationStringA(Source DTWAIN_SOURCE, Rotation string) int32 {
    theProc := d.procs["DTWAIN_SetRotationStringA"]
    arg_0 := []byte(Rotation)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetRotationStringW(Source DTWAIN_SOURCE, Rotation uintptr) int32 {
    theProc := d.procs["DTWAIN_SetRotationStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Rotation)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetSaveFileName(Source DTWAIN_SOURCE, fName uintptr) int32 {
    theProc := d.procs["DTWAIN_SetSaveFileName"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), fName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetSaveFileNameA(Source DTWAIN_SOURCE, fName string) int32 {
    theProc := d.procs["DTWAIN_SetSaveFileNameA"]
    arg_0 := []byte(fName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetSaveFileNameW(Source DTWAIN_SOURCE, fName uintptr) int32 {
    theProc := d.procs["DTWAIN_SetSaveFileNameW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), fName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetShadow(Source DTWAIN_SOURCE, Shadow float64) int32 {
    theProc := d.procs["DTWAIN_SetShadow"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Shadow))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetShadowString(Source DTWAIN_SOURCE, Shadow uintptr) int32 {
    theProc := d.procs["DTWAIN_SetShadowString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Shadow)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetShadowStringA(Source DTWAIN_SOURCE, Shadow string) int32 {
    theProc := d.procs["DTWAIN_SetShadowStringA"]
    arg_0 := []byte(Shadow)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetShadowStringW(Source DTWAIN_SOURCE, Shadow uintptr) int32 {
    theProc := d.procs["DTWAIN_SetShadowStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Shadow)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetSourceUnit(Source DTWAIN_SOURCE, Unit int32) int32 {
    theProc := d.procs["DTWAIN_SetSourceUnit"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Unit))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTIFFCompressType(Source DTWAIN_SOURCE, Setting int32) int32 {
    theProc := d.procs["DTWAIN_SetTIFFCompressType"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Setting))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTIFFInvert(Source DTWAIN_SOURCE, Setting int32) int32 {
    theProc := d.procs["DTWAIN_SetTIFFInvert"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Setting))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTempFileDirectory(szFilePath uintptr) int32 {
    theProc := d.procs["DTWAIN_SetTempFileDirectory"]
    v1, _, _ := syscall.SyscallN(theProc, szFilePath)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTempFileDirectoryA(szFilePath string) int32 {
    theProc := d.procs["DTWAIN_SetTempFileDirectoryA"]
    arg_0 := []byte(szFilePath)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTempFileDirectoryEx(szFilePath uintptr, CreationFlags int32) int32 {
    theProc := d.procs["DTWAIN_SetTempFileDirectoryEx"]
    v1, _, _ := syscall.SyscallN(theProc, szFilePath, uintptr(CreationFlags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTempFileDirectoryExA(szFilePath string, CreationFlags int32) int32 {
    theProc := d.procs["DTWAIN_SetTempFileDirectoryExA"]
    arg_0 := []byte(szFilePath)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(CreationFlags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTempFileDirectoryExW(szFilePath uintptr, CreationFlags int32) int32 {
    theProc := d.procs["DTWAIN_SetTempFileDirectoryExW"]
    v1, _, _ := syscall.SyscallN(theProc, szFilePath, uintptr(CreationFlags))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTempFileDirectoryW(szFilePath uintptr) int32 {
    theProc := d.procs["DTWAIN_SetTempFileDirectoryW"]
    v1, _, _ := syscall.SyscallN(theProc, szFilePath)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetThreshold(Source DTWAIN_SOURCE, Threshold float64, bSetBithDepthReduction int32) int32 {
    theProc := d.procs["DTWAIN_SetThreshold"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(Threshold), uintptr(bSetBithDepthReduction))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetThresholdString(Source DTWAIN_SOURCE, Threshold uintptr, bSetBitDepthReduction int32) int32 {
    theProc := d.procs["DTWAIN_SetThresholdString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Threshold, uintptr(bSetBitDepthReduction))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetThresholdStringA(Source DTWAIN_SOURCE, Threshold string, bSetBitDepthReduction int32) int32 {
    theProc := d.procs["DTWAIN_SetThresholdStringA"]
    arg_0 := []byte(Threshold)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(bSetBitDepthReduction))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetThresholdStringW(Source DTWAIN_SOURCE, Threshold uintptr, bSetBitDepthReduction int32) int32 {
    theProc := d.procs["DTWAIN_SetThresholdStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Threshold, uintptr(bSetBitDepthReduction))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTwainDSM(DSMType int32) int32 {
    theProc := d.procs["DTWAIN_SetTwainDSM"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(DSMType))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTwainLog(LogFlags uint32, lpszLogFile uintptr) int32 {
    theProc := d.procs["DTWAIN_SetTwainLog"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(LogFlags), lpszLogFile)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTwainLogA(LogFlags uint32, lpszLogFile string) int32 {
    theProc := d.procs["DTWAIN_SetTwainLogA"]
    arg_0 := []byte(lpszLogFile)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(LogFlags), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTwainLogW(LogFlags uint32, lpszLogFile uintptr) int32 {
    theProc := d.procs["DTWAIN_SetTwainLogW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(LogFlags), lpszLogFile)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTwainMode(lAcquireMode int32) int32 {
    theProc := d.procs["DTWAIN_SetTwainMode"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(lAcquireMode))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetTwainTimeout(milliseconds int32) int32 {
    theProc := d.procs["DTWAIN_SetTwainTimeout"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(milliseconds))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetUpdateDibProc(DibProc DTWAIN_DIBUPDATE_PROC) DTWAIN_DIBUPDATE_PROC {
    theProc := d.procs["DTWAIN_SetUpdateDibProc"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(DibProc))
    return DTWAIN_DIBUPDATE_PROC(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetXResolution(Source DTWAIN_SOURCE, xResolution float64) int32 {
    theProc := d.procs["DTWAIN_SetXResolution"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(xResolution))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetXResolutionString(Source DTWAIN_SOURCE, Resolution uintptr) int32 {
    theProc := d.procs["DTWAIN_SetXResolutionString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Resolution)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetXResolutionStringA(Source DTWAIN_SOURCE, Resolution string) int32 {
    theProc := d.procs["DTWAIN_SetXResolutionStringA"]
    arg_0 := []byte(Resolution)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetXResolutionStringW(Source DTWAIN_SOURCE, Resolution uintptr) int32 {
    theProc := d.procs["DTWAIN_SetXResolutionStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Resolution)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetYResolution(Source DTWAIN_SOURCE, yResolution float64) int32 {
    theProc := d.procs["DTWAIN_SetYResolution"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(yResolution))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetYResolutionString(Source DTWAIN_SOURCE, Resolution uintptr) int32 {
    theProc := d.procs["DTWAIN_SetYResolutionString"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Resolution)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetYResolutionStringA(Source DTWAIN_SOURCE, Resolution string) int32 {
    theProc := d.procs["DTWAIN_SetYResolutionStringA"]
    arg_0 := []byte(Resolution)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SetYResolutionStringW(Source DTWAIN_SOURCE, Resolution uintptr) int32 {
    theProc := d.procs["DTWAIN_SetYResolutionStringW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), Resolution)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ShowUIOnly(Source DTWAIN_SOURCE) int32 {
    theProc := d.procs["DTWAIN_ShowUIOnly"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_ShutdownOCREngine(OCREngine DTWAIN_OCRENGINE) int32 {
    theProc := d.procs["DTWAIN_ShutdownOCREngine"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(OCREngine))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SkipImageInfoError(Source DTWAIN_SOURCE, bSkip int32) int32 {
    theProc := d.procs["DTWAIN_SkipImageInfoError"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(bSkip))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_StartThread(DLLHandle DTWAIN_HANDLE) int32 {
    theProc := d.procs["DTWAIN_StartThread"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(DLLHandle))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_StartTwainSession(hWndMsg HWND, lpszDLLName uintptr) int32 {
    theProc := d.procs["DTWAIN_StartTwainSession"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndMsg), lpszDLLName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_StartTwainSessionA(hWndMsg HWND, lpszDLLName string) int32 {
    theProc := d.procs["DTWAIN_StartTwainSessionA"]
    arg_0 := []byte(lpszDLLName)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndMsg), uintptr(unsafe.Pointer(&arg_0[0])))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_StartTwainSessionW(hWndMsg HWND, lpszDLLName uintptr) int32 {
    theProc := d.procs["DTWAIN_StartTwainSessionW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hWndMsg), lpszDLLName)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysDestroy() int32 {
    theProc := d.procs["DTWAIN_SysDestroy"]
    v1, _, _ := syscall.SyscallN(theProc)
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitialize() DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitialize"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeEx(szINIPath uintptr) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeEx"]
    v1, _, _ := syscall.SyscallN(theProc, szINIPath)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeEx2(szINIPath uintptr, szImageDLLPath uintptr, szLangResourcePath uintptr) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeEx2"]
    v1, _, _ := syscall.SyscallN(theProc, szINIPath, szImageDLLPath, szLangResourcePath)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeEx2A(szINIPath string, szImageDLLPath string, szLangResourcePath string) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeEx2A"]
    arg_0 := []byte(szINIPath)
    arg_1 := []byte(szImageDLLPath)
    arg_2 := []byte(szLangResourcePath)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])))
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeEx2W(szINIPath uintptr, szImageDLLPath uintptr, szLangResourcePath uintptr) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeEx2W"]
    v1, _, _ := syscall.SyscallN(theProc, szINIPath, szImageDLLPath, szLangResourcePath)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeExA(szINIPath string) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeExA"]
    arg_0 := []byte(szINIPath)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(unsafe.Pointer(&arg_0[0])))
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeExW(szINIPath uintptr) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeExW"]
    v1, _, _ := syscall.SyscallN(theProc, szINIPath)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeLib(hInstance HINSTANCE) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeLib"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hInstance))
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeLibEx(hInstance HINSTANCE, szINIPath uintptr) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeLibEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hInstance), szINIPath)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeLibEx2(hInstance HINSTANCE, szINIPath uintptr, szImageDLLPath uintptr, szLangResourcePath uintptr) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeLibEx2"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hInstance), szINIPath, szImageDLLPath, szLangResourcePath)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeLibEx2A(hInstance HINSTANCE, szINIPath string, szImageDLLPath string, szLangResourcePath string) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeLibEx2A"]
    arg_0 := []byte(szINIPath)
    arg_1 := []byte(szImageDLLPath)
    arg_2 := []byte(szLangResourcePath)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hInstance), uintptr(unsafe.Pointer(&arg_0[0])), uintptr(unsafe.Pointer(&arg_1[0])), uintptr(unsafe.Pointer(&arg_2[0])))
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeLibEx2W(hInstance HINSTANCE, szINIPath uintptr, szImageDLLPath uintptr, szLangResourcePath uintptr) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeLibEx2W"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hInstance), szINIPath, szImageDLLPath, szLangResourcePath)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeLibExA(hInstance HINSTANCE, szINIPath string) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeLibExA"]
    arg_0 := []byte(szINIPath)
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hInstance), uintptr(unsafe.Pointer(&arg_0[0])))
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeLibExW(hInstance HINSTANCE, szINIPath uintptr) DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeLibExW"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(hInstance), szINIPath)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_SysInitializeNoBlocking() DTWAIN_HANDLE {
    theProc := d.procs["DTWAIN_SysInitializeNoBlocking"]
    v1, _, _ := syscall.SyscallN(theProc)
    return DTWAIN_HANDLE(v1)
}

func (d *DTWAIN_DLL) DTWAIN_TestGetCap(Source DTWAIN_SOURCE, lCapability int32) DTWAIN_ARRAY {
    theProc := d.procs["DTWAIN_TestGetCap"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(lCapability))
    return DTWAIN_ARRAY(v1)
}

func (d *DTWAIN_DLL) DTWAIN_UnlockMemory(h HANDLE) int32 {
    theProc := d.procs["DTWAIN_UnlockMemory"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(h))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_UnlockMemoryEx(h HANDLE) int32 {
    theProc := d.procs["DTWAIN_UnlockMemoryEx"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(h))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_UpdateCurrentAcquiredImage(Source DTWAIN_SOURCE, hNewDib HANDLE) int32 {
    theProc := d.procs["DTWAIN_UpdateCurrentAcquiredImage"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(Source), uintptr(hNewDib))
    return int32(v1)
}

func (d *DTWAIN_DLL) DTWAIN_UseMultipleThreads(bSet int32) int32 {
    theProc := d.procs["DTWAIN_UseMultipleThreads"]
    v1, _, _ := syscall.SyscallN(theProc, uintptr(bSet))
    return int32(v1)
}

func (d *DTWAIN_DLL) Close() error {
	if d.Handle == 0 {
		return nil
	}
	err := syscall.FreeLibrary(d.Handle)
	d.Handle = 0
	return err
}

