Compilando TSCAN MVC2010

Compilando TSCAN MVC2010

Postby nnicanor » Sat Apr 07, 2012 6:01 pm

Trantando de compilar TSCAN con Harbour 3.1 y MVC 2010 tengo estos problemas al enlazar

he creado la lib de la siguiente manera desde EZTW32.DLL

impdef twain.def EZTW32.DLL

lib.exe /DEF:twain.def /OUT:twain.lib /MACHINE:X86

Para crear la lib he probado con parametros de impdef -a , -aa, -h.

Si compilo y enlazo con Harbour 3.1 o xHarbour 1.2.1 y BCC63 lo hace bien, no se que me falta con MVC

TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_Acquire@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ACQUIRE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_FreeNative@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_FREE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SelectImageSource@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SELECTIMAGESOURCE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_AcquireNative@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ACQUIRENATIVE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_AcquireToClipboard@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ACQUIRETOCLIPBOARD
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_AcquireMemory@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ACQUIREMEMORY
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_AcquireToFilename@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ACQUIRETOFILENAME
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_AcquireFile@12 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ACQUIREFILE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_IsAvailable@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_AVAIL
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_EasyVersion@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_EASYVERSION
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_State@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_STATE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SourceName@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SOURCENAME
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetSourceName@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETSOURCENAME
TSCAN.obj : error LNK2019: sÝmbolo externo _DIB_WriteToJpeg@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_DIBWJPG
TSCAN.obj : error LNK2019: sÝmbolo externo _DIB_WriteToBmp@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_DIBWBMP
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_IsJpegAvailable@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ISJPG
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetSaveFormat@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETSAVEFORMAT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetSaveFormat@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETSAVEFORMAT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetJpegQuality@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETJPEGQUALITY
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetJpegQuality@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETJPEGQUALITY
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_WriteNativeToFilename@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_WRITENATIVETOFILENAME
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_LoadNativeFromFilename@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_LOADNATIVEFROMFILENAME
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetMultiTransfer@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETMULTITRANSFER
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetMultiTransfer@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETMULTITRANSFER
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetHideUI@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETHIDEUI
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetHideUI@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETHIDEUI
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_DisableParent@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_DISABLEPARENT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetDisableParent@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETDISABLEPARENT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_RegisterApp@32 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_REGISTERAPP
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetAppTitle@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETAPPTITLE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_LoadSourceManager@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_LOADSOURCEMANAGER
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_OpenSourceManager@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_OPENSOURCEMANAGER
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_OpenDefaultSource@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_OPENDEFAULTSOURCE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetSourceList@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETSOURCELIST
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetNextSourceName@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETNEXTSOURCENAME
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetDefaultSourceName@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETDEFAULTSOURCENAME
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_OpenSource@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_OPENSOURCE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_EnableSource@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ENABLESOURCE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_DisableSource@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_DISABLESOURCE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_CloseSource@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_CLOSESOURCE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_CloseSourceManager@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_CLOSESOURCEMANAGER
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_UnloadSourceManager@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_UNLOADSOURCEMANEGER
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetCurrentUnits@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETCURRENTUNITS
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetCurrentUnits@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETCURRENTUNITS
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetBitDepth@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETBITDEPTH
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetBitDepth@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETBITDEPTH
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetPixelType@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETPIXELTYPE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetCurrentPixelType@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETCURRENTPIXELTYPE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetCurrentResolution@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETCURRENTRESOLUTION
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetYResolution@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETYRESOLUTION
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetCurrentResolution@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETCURRENTRESOLUTION
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetXResolution@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETXRESOLUTION
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetYResolution@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETYRESOLUTION
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetContrast@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETCONTRATS
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetBrightness@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETBRIGHTNESS
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetThreshold@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETTHRESHOLD
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetCurrentThreshold@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETCURRENTTHRESHOLD
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetXferMech@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETXFERMECH
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_XferMech@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_XFERMECH
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SupportsFileXfer@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SUPPORTSFILEXFER
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetPaperSize@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETPAPERSIZE
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_HasFeeder@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_HASFEEDER
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_IsFeederSelected@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ISFEEDERSELECTED
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SelectFeeder@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SELECTFEEDER
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_IsAutoFeedOn@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ISAUTOFEEDON
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetAutoFeed@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETAUTOFEDD
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_IsFeederLoaded@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ISFEEDERLOADED
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetDuplexSupport@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETDUPLEXSUPPORT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_EnableDuplex@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ENABLEDUPLEX
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_IsDuplexEnabled@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_ISDUPLEXENABLED
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_HasControllableUI@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_HASCONTROLLABLEUI
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetIndicators@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETINDICATORS
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_Compression@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_COMPRESSION
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetCompression@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETCOMPRESSION
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_Tiled@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_TILED
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetTiled@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETTILED
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_PlanarChunky@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_PLANARCHUNKY
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetPlanarChunky@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETPLANARCHUNKY
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_PixelFlavor@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_PIXELFLAVOR
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetPixelFlavor@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETPIXELFLAVOR
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetLightPath@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETLIGHTPATH
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetAutoBright@4 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETAUTOBRIGHT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetGamma@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETGAMMA
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetShadow@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETSHADOW
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetHighlight@8 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETHIGHLIGHT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_SetImageLayout@32 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_SETIMAGELAYOUT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_ResetImageLayout@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_RESETIMAGELAYOUT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetImageLayout@16 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETIMAGELAYOUT
TSCAN.obj : error LNK2019: sÝmbolo externo _TWAIN_GetDefaultImageLayout@16 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_GETDEFAULTIMAGELAYOUT
TSCAN.obj : error LNK2019: sÝmbolo externo _DIB_GetFromClipboard@0 sin resolver al que se hace referencia en la funci¾n _HB_FUN_TW_DIB_GETFROMCLIPBOARD


Slds
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sat Apr 07, 2012 6:40 pm

Aqui esta el fuente de TSCAN tomado de TSCAN32 de Rafa Carmona

Code: Select all  Expand view

//  $Id: TSCAN.prg,v 1.1 2004/03/22 12:20:43 xthefull Exp $
// Example scanner, Class TSCAN32 and Wrappers for [x]Harbour
//    This program is free software; you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation; either version 2 of the License, or
//    (at your option) any later version.

//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.

//    You should have received a copy of the GNU General Public License
//    along with this software; see the file COPYING.  If not, write to
//    the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
//    Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).

//    The exception is that, if you link the class Tscan32 and Wrappers C with other
//    files to produce an executable, this does not by itself cause the
//    resulting executable to be covered by the GNU General Public License.
//    Your use of that executable is in no way restricted on account of
//    linking the Tscan32 and Wrappers library code into it.

// 2003(c)- Rafa Carmona( Thefull )
//
// interface to Dosadi EZTWAIN library by TheFull
// Interface para la libreria EZTWAIN de Dosadi por TheFull
// 32 bits

// ATENTION. THIS LICENSE NOT APLICATTE A EZTWAIN.
// YOUR VIEW LICENSE EZTW32.DLL IN WWW.DOSADI.COM

#INCLUDE "HBCLASS.CH"


// Returns the TWAIN Protocol State per the spec.
#define TWAIN_PRESESSION        1   // source manager not loaded
#define TWAIN_SM_LOADED         2   // source manager loaded
#define TWAIN_SM_OPEN           3   // source manager open
#define TWAIN_SOURCE_OPEN       4   // source open but not enabled
#define TWAIN_SOURCE_ENABLED    5   // source enabled to acquire
#define TWAIN_TRANSFER_READY    6   // image ready to transfer
#define TWAIN_TRANSFERRING      7   // image in transit

***************************************************************************
*
* CLASS TSCAN32
* 2003(c)- by Rafa Carmona ( TheFull )
* Beta 1.0
* Beta 2.0  New. Support Get ClipBoard to hDib.
*           New. ClipboardToFile( cFile ) -> Save File Jpg into Clipboard.
*
* Beta 3.0  New. ReWrite Method End, conflict GPFs  ;)
*
* Beta 4.0  Return parameters in format Logical. Change hb_retni() with hb_retl()
*
****************************************************************************

CLASS TSCAN32

      DATA hWnd
      DATA cFile
      DATA hDib
      DATA lError INIT .F.
      DATA nState
      DATA lBmp   INIT .F.

      METHOD New( cFile, hWnd ) CONSTRUCTOR
      METHOD End()
      METHOD Register()
      MESSAGE FreeNative METHOD End()
      MESSAGE Close      METHOD End()

      METHOD DigiToFile( cFile )
      METHOD DibToJpeg( cFile )  INLINE TW_DibWJpg( ::hDib, cFile )
      METHOD DibToBmp( cFile )   INLINE TW_DibWBmp( ::hDib, cFile )
      METHOD SetJpegQ( nQuality) INLINE TW_SetJpegQuality( nQuality )// 1..100 Default 75

      METHOD Acquire()           INLINE TW_Acquire( ::hWnd )
      METHOD AcquireClipBoard()  INLINE TW_AcquireToClipboard( ::hWnd , 0 )

      METHOD OpenDefault()
      METHOD OpenSource()
      METHOD EnableSource()     INLINE TW_EnableSource( ::hWnd )
      METHOD Choose()           INLINE TW_SelectImageSource()

      // **********    Basic TWAIN Inquiries **********************************
      METHOD IsAvailable()          INLINE TW_Avail()
      METHOD Version()              INLINE ( Str( TW_EasyVersion() / 100 ) )
      METHOD State()                INLINE (::nState := TW_State() )
      METHOD SourceName()           INLINE TW_SourceName()
      METHOD GetSourceName( cName ) INLINE TW_GetSourceName( cName )


      //************   Global Options *****************************************
      METHOD SetHide( lHide )     INLINE IIF( lHide , TW_SetHideUI(1), TW_SetHideUI(0) )


      //-*********** High-level Capability Negotiation Functions **************
      // These functions should only be called in State 4 (TWAIN_SOURCE_OPEN)
      METHOD PixelType( nType ) INLINE ( ::State(),;
                                if( ::nState >= TWAIN_SOURCE_OPEN,;
                                                TW_SetCurrentPixelType( nType ),0 ) )
      METHOD SetRes( dRes )     INLINE ( ::State(),;
                                if( ::nState >= TWAIN_SOURCE_OPEN,;
                                                TW_SetCurrentResolution( dRes ),0) )
      METHOD SetXRes( dRes )            INLINE TW_SetXResolution( dRes )
      METHOD SetYRes( dRes )            INLINE TW_SetYResolution( dRes )
      METHOD SetUnits( nUnits )         INLINE TW_SETCURRENTUNITS( nUnits )
      METHOD SetContrats( dContrats)    INLINE TW_SETCONTRATS( dContrats  )
      METHOD SetBright( dBright )       INLINE TW_SETBRIGHTNESS( dBright )
      METHOD SetPaper( nPaper )         INLINE TW_SETPAPERSIZE( nPaper )
      METHOD GetResolution()            INLINE TW_GETCURRENTRESOLUTION()


      //******** Image Layout (Region of Interest) **********************
      METHOD RegionSet( nLeft,nTop, nRigth, nBottom )  INLINE TW_SetImageLayout( nLeft,nTop, nRigth, nBottom )
      METHOD RegionReset()                             INLINE TW_ResetImageLayout()
      METHOD RegionGet( L,T,R,B )                      INLINE TW_GetImageLayout(@L,@T,@R,@B)
      METHOD RegionGetDefault( L,T,R,B )               INLINE TW_GetDefaultImageLayout(@L,@T,@R,@B)

      METHOD ClipBoardToFile( cFile )
      METHOD DIB_GetFromClipboard() INLINE TW_DIB_GetFromClipboard()

      // feeader
      METHOD HasFeeder()    INLINE TW_HasFeeder()
      METHOD IsFeederLoad() INLINE TW_IsFeederLoaded()
      METHOD IsAutoFeedOn() INLINE TW_IsAutoFeedon()
      METHOD SetAutoFedd( lOnOff )  INLINE TW_SetAutoFedd( lOnOff )
      METHOD SelectFeeder( lOnOff )  INLINE TW_SelectFeeder( lOnOff )

ENDCLASS

***********************************************************
***********************************************************
METHOD New( cFile, hWnd ) CLASS TSCAN32

       IF Empty( hWnd )
          ::hWnd := GetActiveWindow()
       ENDIF

       IF Empty( cFile )
          ::cFile := "TestTscan32.jpg"
       ELSE
          ::cFile := cFile
       ENDIF


       IF !::IsAvailable()
          ::lError := .T.
         // MsgStop( "TWAIN no found","Attention!") // Only Fivewin
       ENDIF

       IF !::lError
          ::Register( 1,0,0,0,"1.0 Beta","by Rafa Carmona","Scan by Thefull","Scan For [x]Harbour" )
       ENDIF
       ::OpenSource()
       ::OpenDefault()

RETURN Self

**********************************************************************
* Comprueba que esta disponible TWAIN y cargalo
**********************************************************************
METHOD OpenSource() CLASS TSCAN32
   Local nResult := TW_LoadSourceManager()

   DO CASE
      CASE nResult = -1
           ::lError := .T.
           // MsgStop("Error Driver TWAIN"," ¿ Insufficient Memory ?")
           Return Self
   ENDCASE

Return Self

***********************************************************************
*  Abre TWAIN el ultimo que fue seleccionado desde Select ..Dialog
* Si no puede cargarlo solicita seleccionar Source.
***********************************************************************
METHOD OpenDefault() CLASS TSCAN32
       Local nResult := TW_OpenDefaultSource()

       DO CASE
          CASE nResult = 0
               ::Choose()
          CASE nResult = -1
               ::lError := .T.
          OTHERWISE
               ::lError := .F.
       ENDCASE

Return Self

**************************************************************************
* Liberamos hDib y cerramos el dispositivo
**************************************************************************
METHOD End() CLASS TSCAN32

   if !Empty( ::hDib )
      TW_Free( ::hDib )
   endif

   TW_CloseSourceManager( ::hWnd ) // Close para evitar GPF

Return NIL

***************************************************************************
* Registra la aplicacion
***************************************************************************
METHOD Register( nMajor ,nMinor,nLanguage,nCountry,cVersion,cName,cFamily,cProduct ) CLASS TSCAN32

       TW_REGISTERAPP( nMajor ,nMinor,nLanguage,nCountry,;
                       cVersion,cName,cFamily,cProduct )

Return Self

***********************************************************
* Digitaliza hacia un fichero .jpg
***********************************************************
METHOD DigiToFile( cFile )

       if EMPTY( cFile )
          cFile := ::cFile
       endif

       IF !::lError
          ::hDib := ::Acquire()         // Importar
       ENDIF

       IF !Empty( ::hDib )
          IF ::lBmp                      // Format bmp
             ::DibToBmp( cFile )       // Si no hacemos uso de BMP
          ELSE
             IF TW_IsJpg()              // Si puede hacer uso del JPG
                ::DibToJpeg( cFile )
             ELSE
                ::DibToBmp( cFile )       // Si no hacemos uso de BMP
             ENDIF
          ENDIF
       ENDIF

Return Self


************************************************************************
* Save content clipboard into to file.jpg
************************************************************************
METHOD ClipBoardToFile( cFile ) CLASS TSCAN32
       Local hDib, nError

       IF Empty( cFile )
          ::cFile := "TestTscan32.jpg"
       ELSE
          ::cFile := cFile
       ENDIF

        hDib := ::DIB_GetFromClipboard()


       IF !Empty( hDib )

           IF ::lBmp
              TW_DibWBmp(  hDib, ::cFile )
           ELSE
              IF TW_IsJpg()              // Si puede hacer uso del JPG
                 TW_DibWJpg( hDib,  ::cFile )
              ELSE
                 TW_DibWBmp(  hDib, ::cFile )
              ENDIF
           ENDIF

           TW_Free( hDib )

       ENDIF

RETURN Self
/* -----------------------------------------------------------------
  Implementation Language C for [x]Harbour(WIN32)
  2003(c)- by Rafa Carmona ( TheFull )

  Wrappers for EZTW32.DLL the DosAdi.

-------------------------------------------------------------------- */

#pragma BEGINDUMP

 #include <windows.h>
 #include "eztwain.h"
 #include "hbapi.h"


/*--------- Top-Level Calls -------------------------------------*/

 HB_FUNC( TW_ACQUIRE )  // hWnd
 {
 
  hb_retnl( ( LONG )TWAIN_Acquire( ( HWND ) hb_parnl( 1 ) ) );
 }

 HB_FUNC( TW_FREE )     // hDib
 {
  TWAIN_FreeNative( ( HANDLE ) hb_parnl( 1 ) );
  hb_ret();
 }

 HB_FUNC( TW_SELECTIMAGESOURCE )  // hWnd
 {
  hb_retni( TWAIN_SelectImageSource( ( HWND ) hb_parnl( 1 ) ) );
 }

 HB_FUNC( TW_ACQUIRENATIVE )  // hWnd, nPixTypes
 {
  hb_retnl( ( LONG )TWAIN_AcquireNative( ( HWND ) hb_parnl( 1 ), (unsigned) hb_parni(2) ) );
 }

 HB_FUNC( TW_ACQUIRETOCLIPBOARD )  // hWnd, nPixTypes
 {
  hb_retl( TWAIN_AcquireToClipboard( ( HWND ) hb_parnl( 1 ), (unsigned) hb_parni(2) ) );
 }

 HB_FUNC( TW_ACQUIREMEMORY )  // hWnd
 {
  hb_retnl( ( LONG )TWAIN_AcquireMemory( ( HWND ) hb_parnl( 1 ) ) );
 }

 HB_FUNC( TW_ACQUIRETOFILENAME )  // hWnd, cFileName
 {
  hb_retni( TWAIN_AcquireToFilename( ( HWND ) hb_parnl( 1 ), hb_parc( 2 ) ) );
 }

 HB_FUNC( TW_ACQUIREFILE )  // hWnd, nFF, cFileName
 {
  hb_retni( TWAIN_AcquireFile( ( HWND ) hb_parnl( 1 ), hb_parni( 2 ) ,hb_parc( 3 ) ) );
 }


//--------- Basic TWAIN Inquiries

 HB_FUNC( TW_AVAIL )
 {
  hb_retl( TWAIN_IsAvailable()  );
 }

 HB_FUNC( TW_EASYVERSION)
 {
  hb_retni( TWAIN_EasyVersion()  );
 }

 HB_FUNC( TW_STATE )
 {
  hb_retni( TWAIN_State() );
 }

 HB_FUNC( TW_SOURCENAME )
 {
  hb_retc( TWAIN_SourceName() );
 }

 HB_FUNC( TW_GETSOURCENAME )   // pzName
 {
  TWAIN_GetSourceName( (LPSTR) hb_parc( 1 ) );
  hb_ret();
 }


//--------- DIB handling utilities ---------

 HB_FUNC( TW_DIBWJPG ) // hDib, cName
 {
  hb_parni( DIB_WriteToJpeg( ( HANDLE ) hb_parnl(1), hb_parc( 2 ) ) );
 }

 HB_FUNC( TW_DIBWBMP ) // hDib, cName
 {
  hb_parni( DIB_WriteToBmp( ( HANDLE ) hb_parnl(1), hb_parc( 2 ) ) );
 }


//--------- File Read/Write

 HB_FUNC( TW_ISJPG )
 {
  hb_retl( TWAIN_IsJpegAvailable() );
 }

 HB_FUNC( TW_SETSAVEFORMAT )
 {
  hb_retni( TWAIN_SetSaveFormat( hb_parni( 1 ) ) );
 }

 HB_FUNC( TW_GETSAVEFORMAT )
 {
  hb_retni( TWAIN_GetSaveFormat() );
 }

 HB_FUNC( TW_SETJPEGQUALITY ) // nQuality 1...100
 {
  TWAIN_SetJpegQuality( hb_parni( 1 ) );
  hb_ret();
 }

 HB_FUNC( TW_GETJPEGQUALITY )
 {
  hb_retni( TWAIN_GetJpegQuality() );
 }

 HB_FUNC( TW_WRITENATIVETOFILENAME )
 {
  hb_retni( TWAIN_WriteNativeToFilename( (HANDLE) hb_parnl(1), hb_parc(2) ));
 }

 HB_FUNC( TW_LOADNATIVEFROMFILENAME )
 {
  hb_retnl( (LONG) TWAIN_LoadNativeFromFilename( hb_parc( 1 ) ) );
 }



//--------- Global Options ----------------------------------------------
 HB_FUNC( TW_SETMULTITRANSFER )
 {
  TWAIN_SetMultiTransfer( hb_parni( 1 ) );
  hb_ret();
 }

 HB_FUNC( TW_GETMULTITRANSFER )
 {
  hb_retni( TWAIN_GetMultiTransfer() );
 }

 HB_FUNC( TW_SETHIDEUI  ) // nHide
 {
  TWAIN_SetHideUI( hb_parni( 1) );
  hb_ret();
 }

 HB_FUNC( TW_GETHIDEUI  )
 {
  hb_retni( TWAIN_GetHideUI() );
 }


 HB_FUNC( TW_DISABLEPARENT )
 {
  TWAIN_DisableParent( hb_parni( 1 ) );
  hb_ret();
 }

 HB_FUNC( TW_GETDISABLEPARENT )
 {
  hb_retni( TWAIN_GetDisableParent() );
 }

 HB_FUNC( TW_REGISTERAPP )
 {

 TWAIN_RegisterApp( hb_parni(1),hb_parni(2),hb_parni(3),hb_parni(4),
                    hb_parc(5), hb_parc(6),
                    hb_parc(7), hb_parc(8) );
 hb_ret();
 }

 HB_FUNC( TW_SETAPPTITLE )
 {
  TWAIN_SetAppTitle( hb_parc( 1 ) );
  hb_ret();
 }




//--------- TWAIN State Control ---------------------------------------

 HB_FUNC( TW_LOADSOURCEMANAGER )
 {
  hb_retni( TWAIN_LoadSourceManager() );
 }

 HB_FUNC( TW_OPENSOURCEMANAGER )  // hWnd
 {
  hb_retni( TWAIN_OpenSourceManager( ( HWND ) hb_parnl( 1 ) ) );
 }

 HB_FUNC( TW_OPENDEFAULTSOURCE )
 {
  hb_retni( TWAIN_OpenDefaultSource() );
 }

 HB_FUNC( TW_GETSOURCELIST )
 {
  hb_retni( TWAIN_GetSourceList() );
 }

 HB_FUNC( TW_GETNEXTSOURCENAME )
 {
  hb_retni( TWAIN_GetNextSourceName( (LPSTR) hb_parc( 1 ) ) );
 }

 HB_FUNC( TW_GETDEFAULTSOURCENAME )
 {
  hb_retni( TWAIN_GetDefaultSourceName( (LPSTR) hb_parc( 1 ) ));
 }

 HB_FUNC( TW_OPENSOURCE )
 {
  hb_retni( TWAIN_OpenSource( hb_parc( 1 ) ) );
 }

 HB_FUNC( TW_ENABLESOURCE )       // hWnd
 {
  hb_retni( TWAIN_EnableSource( ( HWND ) hb_parnl( 1 ) ) );
 }

 HB_FUNC( TW_DISABLESOURCE )
 {
  hb_retni( TWAIN_DisableSource( ) );

 }

 HB_FUNC( TW_CLOSESOURCE )
 {
  hb_retni( TWAIN_CloseSource() );
 }

 HB_FUNC( TW_CLOSESOURCEMANAGER )
 {
  hb_retni( TWAIN_CloseSourceManager( (HWND) hb_parnl( 1 ) ) );
 }

 HB_FUNC( TW_UNLOADSOURCEMANEGER )
 {
  hb_retni( TWAIN_UnloadSourceManager() );
 }



//--------- High-level Capability Negotiation Functions --------------
// These functions should only be called in State 4 (TWAIN_SOURCE_OPEN)

 HB_FUNC( TW_GETCURRENTUNITS )
 {
  hb_retni( TWAIN_GetCurrentUnits() );
 }

 HB_FUNC( TW_SETCURRENTUNITS ) // nUnits
 {
  hb_retni( TWAIN_SetCurrentUnits( hb_parni( 1 ) ) );
 }

 HB_FUNC( TW_GETBITDEPTH )
 {
  hb_retni( TWAIN_GetBitDepth() );
 }

 HB_FUNC( TW_SETBITDEPTH )
 {
  hb_retni( TWAIN_SetBitDepth( hb_parni( 1 ) ) );
 }

 HB_FUNC( TW_GETPIXELTYPE )
 {
  hb_retni( TWAIN_GetPixelType() );
 }

 HB_FUNC( TW_SETCURRENTPIXELTYPE )  // nBits
 {
  hb_retni( TWAIN_SetCurrentPixelType( hb_parni( 1 ) ) );
 }

 HB_FUNC( TW_GETCURRENTRESOLUTION )
 {
  hb_retnd( TWAIN_GetCurrentResolution());
 }

 HB_FUNC( TW_GETYRESOLUTION )
 {
  hb_retnd( TWAIN_GetYResolution());
 }

 HB_FUNC( TW_SETCURRENTRESOLUTION )  // dRes
 {
  hb_retni( TWAIN_SetCurrentResolution( hb_parnd( 1 ) ) );
 }

 HB_FUNC( TW_SETXRESOLUTION )
 {
  hb_retni( TWAIN_SetXResolution( hb_parnd( 1 ) ) );
 }

 HB_FUNC( TW_SETYRESOLUTION )
 {
  hb_retni( TWAIN_SetYResolution( hb_parnd( 1 ) ) );
 }

 HB_FUNC( TW_SETCONTRATS ) //dCon
 {
  hb_retni( TWAIN_SetContrast( hb_parnd( 1 ) ) ); // -1000....+1000
 }

 HB_FUNC( TW_SETBRIGHTNESS ) //dBri
 {
  hb_retni( TWAIN_SetBrightness( hb_parnd( 1 ) ) ); // -1000....+1000
  }

 HB_FUNC( TW_SETTHRESHOLD )
 {
  hb_retni( TWAIN_SetThreshold( hb_parnd( 1 ) ) );
 }

 HB_FUNC( TW_GETCURRENTTHRESHOLD )
 {
  hb_retnd( TWAIN_GetCurrentThreshold() );
 }

 HB_FUNC( TW_SETXFERMECH )
 {
  hb_retni( TWAIN_SetXferMech( hb_parni( 1 ) ) );
 }

 HB_FUNC( TW_XFERMECH )
 {
  hb_retni( TWAIN_XferMech() );
 }

 HB_FUNC( TW_SUPPORTSFILEXFER )
 {
  hb_retni( TWAIN_SupportsFileXfer() );
 }

 HB_FUNC( TW_SETPAPERSIZE ) // nTypePaper
 {
  hb_retni( TWAIN_SetPaperSize( hb_parni( 1 ) ) );
 }

//-------- Document Feeder ---------------------------------

 HB_FUNC( TW_HASFEEDER )
 {
  hb_retl( TWAIN_HasFeeder() );
 }

 HB_FUNC( TW_ISFEEDERSELECTED )
 {
  hb_retl( TWAIN_IsFeederSelected() );
 }

 HB_FUNC( TW_SELECTFEEDER )
 {
  hb_retl( TWAIN_SelectFeeder( hb_parl( 1 ) ) );
 }

 HB_FUNC( TW_ISAUTOFEEDON )
 {
  hb_retl( TWAIN_IsAutoFeedOn() );
 }

 HB_FUNC( TW_SETAUTOFEDD )
 {
  hb_retl( TWAIN_SetAutoFeed( hb_parl( 1 ) ) );
 }

 HB_FUNC( TW_ISFEEDERLOADED )
 {
  hb_retl( TWAIN_IsFeederLoaded() );
 }

//-------- Duplex Scanning ------------------------------------------
 HB_FUNC( TW_GETDUPLEXSUPPORT )
 {
  hb_retni( TWAIN_GetDuplexSupport() );
 }

 HB_FUNC( TW_ENABLEDUPLEX )
 {
  hb_retni( TWAIN_EnableDuplex( hb_parni( 1 ) ) );
 }

 HB_FUNC( TW_ISDUPLEXENABLED )
 {
  hb_retl( TWAIN_IsDuplexEnabled() );
 }

//--------- Other 'exotic' capabilities --------

 HB_FUNC( TW_HASCONTROLLABLEUI )
 {
  hb_retni( TWAIN_HasControllableUI() );
 }

 HB_FUNC( TW_SETINDICATORS )
 {
  hb_retni( TWAIN_SetIndicators( hb_parl( 1 ) ) );
 }

 HB_FUNC( TW_COMPRESSION )
 {
  hb_retni( TWAIN_Compression() );
 }

 HB_FUNC( TW_SETCOMPRESSION )
 {
  hb_retni( TWAIN_SetCompression( hb_parni( 1 ) ) );
 }

 HB_FUNC( TW_TILED )
 {
  hb_retl( TWAIN_Tiled() );
 }

 HB_FUNC( TW_SETTILED )
 {
  hb_retni( TWAIN_SetTiled( hb_parl( 1 ) ) );
 }

 HB_FUNC( TW_PLANARCHUNKY )
 {
  hb_retni( TWAIN_PlanarChunky() );
 }

 HB_FUNC( TW_SETPLANARCHUNKY )
 {
  hb_retni( TWAIN_SetPlanarChunky( hb_parni( 1 ) ) );
 }

 HB_FUNC( TW_PIXELFLAVOR )
 {
  hb_retni( TWAIN_PixelFlavor() );
 }

 HB_FUNC( TW_SETPIXELFLAVOR )
 {
  hb_retni( TWAIN_SetPixelFlavor( hb_parni( 1 ) ) );
 }

 HB_FUNC( TW_SETLIGHTPATH )
 {
  hb_retni( TWAIN_SetLightPath( hb_parl( 1 ) ) );
 }

 HB_FUNC( TW_SETAUTOBRIGHT )
 {
  hb_retni( TWAIN_SetAutoBright( hb_parl( 1 ) ) );
 }

 HB_FUNC( TW_SETGAMMA )
 {
  hb_retni( TWAIN_SetGamma( hb_parnd( 1 ) ) );
 }

 HB_FUNC( TW_SETSHADOW )
 {
  hb_retni( TWAIN_SetShadow( hb_parnd( 1 ) ) );
 }

 HB_FUNC( TW_SETHIGHLIGHT )
 {
  hb_retni( TWAIN_SetHighlight( hb_parnd( 1 ) ) );
 }
//--------- Image Layout (Region of Interest) --------


 HB_FUNC( TW_SETIMAGELAYOUT )   // left, top, right, bottom
 {
  hb_retni( TWAIN_SetImageLayout( hb_parnd( 1 ),hb_parnd( 2 ),hb_parnd( 3 ),hb_parnd( 4 ) ) );
 }

 HB_FUNC( TW_RESETIMAGELAYOUT )
 {
  TWAIN_ResetImageLayout();
  hb_ret();
 }

 HB_FUNC( TW_GETIMAGELAYOUT )
 {
  double L,T,R,B;
  int nRet;

  nRet = TWAIN_GetImageLayout( &L,&T,&R,&B );

  hb_stornd( L, 1 );
  hb_stornd( T, 2 );
  hb_stornd( R, 3 );
  hb_stornd( B, 4 );
  hb_retni( nRet );
 }

 HB_FUNC( TW_GETDEFAULTIMAGELAYOUT )
 {
  double L,T,R,B;
  int nRet;

  nRet = TWAIN_GetDefaultImageLayout( &L, &T, &R, &B);

  hb_stornd( L, 1 );
  hb_stornd( T, 2 );
  hb_stornd( R, 3 );
  hb_stornd( B, 4 );
  hb_retni( nRet );
 }

//HANDLE EZTAPI DIB_GetFromClipboard(void);
HB_FUNC( TW_DIB_GETFROMCLIPBOARD )
{
 hb_retnl( (LONG) DIB_GetFromClipboard() );
}

// para no depender de Five, y harbour poder el solito trabajar ;)
 HB_FUNC ( GETACTIVEWINDOW )
 {
  hb_retnl( ( LONG ) GetActiveWindow() );
 }

#pragma ENDDUMP


/*
  TWAIN.
  Bajo estas siglas se esconde la tecnologica de adquisicion de imagen
  desde cualquier tipo de dispositivo que cumpla dicho standar, como
  puede ser el dispositivo mas comun, el scanner, a otros como las camaras
  WebCam.

  En este capitulo veremos las posibilidades qe tenemos nosotros , vil
  progrmador de Harbour&Fivewin, de aprovecharnos.

  He de decir que nosotros usaremos un 'atajo'. Dicho 'atajo' sera hacer
  uso de un par de DLL que a parte de cumplir nuestro requisito , que es
  ni mas ni menos que controlar un dispositivo que cumpla la norma TWAIN,
  nos hara la programacion muchisimo mas sencilla.

  La primera DLL a usar sera EZTW32.DLL, de la compañia dosadi.
  Dicha DLL nos brinda la posibilidad de conectar con el standard TWAIN
  de  una forma mucho mas simple.
  He de decir que es perfectamente posible programar el TWAIN directamente,
  ahora bien, no creo que el esfuerzo invertido merezca la pena teniendo
  dicha DLL a nuestro alcance.

  La segunda es ij11.dll de la casa Intel. Dicha libreria es usada por
  la dll EZTW32.DLL para guardar la imagen obtenido a un fichero JPEG.
  Si no tuvieramos dicha ij11.dll, simplemente se guardara en formato BMP.

  Teniendo en cuenta todo esto, empezaremos a explicar la clase de mi
  creacion: TSCAN32.

  El motivo principal a que me ha llevado a crear la interface con el
  driver TWAIN son dos:

   1.- La clase TScan de 16 bits que viene con Fivewin, en determinados
       momentos no funciona como deberia de funcionar.

   2.- La salida no era posible guardala como formato JPEG.

   Asi que os podeis imaginar las mejoras de la nueva clase con respecto
   a la de 16 bits:

   1.- 32 Bits
   2.- Interface en lenguaje C.
   3.- Graba en JPEGS o directamente al portapapeles!!!
   4.- Realmente funciona!!! ;-)

   Veamos pues todo el entramado en codigo fuente.

   Creacion de un objeto TScan y scaneando:

      oScan := TScan32():New( cFile )
      oScan:DigiToFile()

   Y esto es todo lo que tienes que escribir!!
   Realmente fantastico, no crees ?

   Ahora bien, como es logico de suponer , quizas nos interese escoger
   que tipo de salida queremos, dimensiones, etc..., como por ejemplo:

      oScan:PixelType( TWPT_GRAY  )  // TWPT_GRAY  = 1

   con esta simple instruccion estamos definiendo que el dispositivo
   capture en Escala de Grises!
   Realmente esto no podria ser mas simple!

   Teneis disponible un ejemplo donde vereis como podemos escanear y
   visualizar lo que hemos escaneado para que veais que con cuatro lineas
   de codigo podemos hacer cosas muy potente.

   Ahora bien, os preguntareis como funciona el chiringuito, pues pasemos
   a ver como esta construido y el porque.

   CLASE TSCAN32. Variables de Instancia y metodos.

   La clase TScan32 te encapsula todo el funcionamiento interno para que
   a la hora de escribir tu aplicacion , el coste de implementacion sea
   minimo, y ya lo creo que es minimo!!! 2 Lineas de programacion y
   tienes tu aplicacion disponible para escanner desde scanners,webcam,etc...

   Aqui detallare los metodos mas interesantes o mas comunes, aunque en
   la implementacion en C realice un largo y tedioso trabajo y esta el
   95% portada para que puedas hacer uso si ese es tu deseo.

   DATAs:
      DATA hWnd
           Handle de la ventana padre.
      DATA cFile
           Nombre del fichero resultante.
      DATA hDib
           Handle del DIB
      DATA lError INIT .F.
           Indica si se ha producido un error
      DATA nState
           Indica en que estado se encuentra el dispositivo TWAIN
      DATA lBmp   INIT .F.
           Indica qe quiero salida BMP si es .T.


   METHODs:

      New( cFile, hWnd ) CONSTRUCTOR
      Inicializa el dispositivo TWAIN.
         cFile := Nombre del Fichero resultante
          hWnd := Handle de la ventana padre

      End(), FreeNative , Close
      Cierra el dispositivo TWAIN y libera hDib.

      Register()
      Registra la aplicacion.

      DigiToFile( cFile )
      Digitaliza directamente a un fichero.
         cFile := Fichero resultante opcional.
                  Por defecto es ::cFile

      DibToJpeg( cFile )  y DibToBmp( cFile )
      Guarda el contenido del resultado de la adquisicion, hDib,
      en un fichero JPEG o BMP

      SetJpegQ( nQuality)
      Calidad del JPEG. Por defecto es 75.
      El baremo es entre 1...100 , siendo 100 maxima calidad.

      Acquire()
      Digilitaliza. Devuelve un DIB.

      AcquireClipBoard()
      Digilitaliza directamente al portapapeles.
      Devuelve .T. o .F. dependiendo si hay error o no.

      OpenDefault()
      Abre TWAIN el ultimo que fue seleccionado desde Select ..Dialog
      Si no puede cargarlo solicita seleccionar Source.

      OpenSource()
      Comprueba que esta disponible TWAIN y lo carga si no estuviera cargado

      Choose()
      Permite seleccionar la fuente desde donde vamos a adquirir.


      IsAvailable()
      Devuelve si esta o no disponible TWAIN en el sistema

      Version()
      Devuelve Version de la DLL de DosAdi.

      State()
      Devuelve el estado del dispositivo.


      SetHide( lHide )
      Oculta UI del escanner.


      Estos metodos solamente pueden ser llamados cuando el dispositvo TWAIN
      se encuentro en un Estado 4  (TWAIN_SOURCE_OPEN)

      PixelType( nType )
      Tipo de scaneo del dispositivo.
        #define TWPT_BW          0  Blanco/Negro
        #define TWPT_GRAY        1  Escala de Grises
        #define TWPT_RGB         2  Color Real
        #define TWPT_PALETTE     3  Color Paleta.


      SetRes( dRes )
      Prepara resolucion a capturar en el dispositivo.

      SetXRes( dRes )  y SetYRes( dRes )
      Prepara resolucion Horizontal y Vertical del dispositivo.

      SetUnits( nUnits )
      Sistema de Medida. Atencion, no todos los dispositivos admiten
      alguna medida de estas, pero todos si que admiten inches.
        #define TWUN_INCHES      0
        #define TWUN_CENTIMETERS 1
        #define TWUN_PICAS       2
        #define TWUN_POINTS      3
        #define TWUN_TWIPS       4
        #define TWUN_PIXELS      5

      SetContrats( dContrats)
      Contraste del dispositivo.

      SetBright( dBright )
      Brillo del dispositivo.

      SetPaper( nPaper )
      Seleccionar tipo de papel , tamaño, del dispositivo,
      Por poner unos pocos, si quieres mas tipo mirate  TWSS_* en TWAIN.H
         #define PAPER_A4LETTER    1
         #define PAPER_B5LETTER    2
         #define PAPER_USLETTER    3
         #define PAPER_USLEGAL     4
         #define PAPER_A5          5
         #define PAPER_B4          6
         #define PAPER_B6          7
         #define PAPER_USLEDGER    9
         #define PAPER_USEXECUTIVE 10
         #define PAPER_A3          11
         #define PAPER_B3          12
         #define PAPER_A6          13
         #define PAPER_C4          14
         #define PAPER_C5          15
         #define PAPER_C6          16

      GetResolution()
      Devuelve que resolucion actualmente tiene el dispositivo.


      Con estos metodos que acontinuacion veremos , podemos seleccionar
      una porcion de la region a adquirir.

      RegionSet( nLeft,nTop, nRigth, nBottom )
      Selecciona una region para adquirir.

      METHOD RegionReset()
      Restaura a la region que habia por defecto, toda la superficie.

      RegionGet( L,T,R,B )
      Devuelve en las variables la porciones de la region actualmente definidas.
      El uso es muy simple:

      Local L,T,R,B  // Left,Top,Rigth y Bottom, logicamente ;)
      oScan := oScan:New()
      oScan:RegionGet(@L,@T,@R,@B), obteniendo el resultado en las misma variables
      pasadas por referencia.

      RegionGetDefault( L,T,R,B )
      Devuelve los valores de la region por defecto. El mismo ejemplo del method
      RegionGet es aplicable a este.


      Y para finalizar , un par de metodos muy utiles:

      ClipBoardToFile( cFile )
      Guarda el contenido del portapapeles en un fichero.

      DIB_GetFromClipboard()
      Coge el contenido del portapapeles ,DIB., y lo asigna a hDib.

      Como podeis observar , esto es mas que suficiente para dotar a nuestras
      aplicaciones Fivewin&Harbour de capacidades de TWAIN.

      Otro aspecto a tener em cuenta son las funciones en C, pero que se
      escapan a la teoria de este libro.

      Quien realemente esta mas interesado en saber sobre TWAIN, vaya a
      internet y realice una busqueda.
      Creo que para nosotros , programadores de Fivewin, esto es mucho
      mas que suficiente y ya les gustaria a mas de uno de otros lenguajes
      de programacion tener esto a su alcance tan facil como aqui he explicado.

      Los wrappers en C los teneis disponibles junto en el fichero de la clase
      TSCAN32 para los que quieran ver el interior o modificarlo a su gusto.

      Teneis portadas 90 funciones desde C para que hagais uso desde harbour.

      Como comentario final, he de decir que a sido probado y con exito en
      scanners paralelos, usb y SCSI, asi como camaras WebCam.


   */









*/
 
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby Antonio Linares » Sat Apr 07, 2012 6:48 pm

Nicanor,

Es un error típico al haber compilado una parte en C++ y la otra en C (por ejemplo, que la librería de importación use símbolos para C y no C++).

Prueba a todo el código en C meterlo dentro de esta sentencia:

extern "C" {
... funciones ...
};
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41328
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sat Apr 07, 2012 7:02 pm

Antonio,


Meti todas las instrucciones dentro de la sentencia al compilar me sale este mensaje:

cl /c -W3 -GA /D_CRT_SECURE_NO_WARNINGS /D__HARBOUR__ /D__FLAT__ "obj\TSCAN.c" /Foobj\TSCAN.obj TSCAN.c

TSCAN.prg(293) : error C2059: error de sintaxis : 'cadena'

Slds
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sun Apr 08, 2012 3:09 am

El error deja de salir cuando agrego el parametro /TP para forzar la compilacion C++ pero igual salen los simbolos sin resolver


Slds
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby Antonio Linares » Sun Apr 08, 2012 7:54 am

Nicanor,

Copia aqui el contenido de twain.def
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41328
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sun Apr 08, 2012 3:38 pm

Antonio,

twain1.def

generado asi:

impdef twain1.def eztw32.dll


Code: Select all  Expand view

LIBRARY     EZTW32.DLL

EXPORTS
    CONTAINER_Array                @317 ; CONTAINER_Array
    CONTAINER_ContainsValue        @308 ; CONTAINER_ContainsValue
    CONTAINER_Copy                 @302 ; CONTAINER_Copy
    CONTAINER_CurrentIndex         @324 ; CONTAINER_CurrentIndex
    CONTAINER_CurrentValue         @310 ; CONTAINER_CurrentValue
    CONTAINER_DefaultIndex         @323 ; CONTAINER_DefaultIndex
    CONTAINER_DefaultValue         @311 ; CONTAINER_DefaultValue
    CONTAINER_DeleteItem           @321 ; CONTAINER_DeleteItem
    CONTAINER_Enumeration          @318 ; CONTAINER_Enumeration
    CONTAINER_FindValue            @309 ; CONTAINER_FindValue
    CONTAINER_FloatValue           @306 ; CONTAINER_FloatValue
    CONTAINER_Format               @303 ; CONTAINER_Format
    CONTAINER_Free                 @301 ; CONTAINER_Free
    CONTAINER_InsertItem           @322 ; CONTAINER_InsertItem
    CONTAINER_IntValue             @307 ; CONTAINER_IntValue
    CONTAINER_ItemCount            @305 ; CONTAINER_ItemCount
    CONTAINER_ItemType             @304 ; CONTAINER_ItemType
    CONTAINER_MaxValue             @313 ; CONTAINER_MaxValue
    CONTAINER_MinValue             @312 ; CONTAINER_MinValue
    CONTAINER_OneValue             @315 ; CONTAINER_OneValue
    CONTAINER_Range                @316 ; CONTAINER_Range
    CONTAINER_SelectCurrentItem    @320 ; CONTAINER_SelectCurrentItem
    CONTAINER_SelectCurrentValue   @328 ; CONTAINER_SelectCurrentValue
    CONTAINER_SelectDefaultItem    @327 ; CONTAINER_SelectDefaultItem
    CONTAINER_SelectDefaultValue   @326 ; CONTAINER_SelectDefaultValue
    CONTAINER_SetItem              @319 ; CONTAINER_SetItem
    CONTAINER_SetItemFrame         @330 ; CONTAINER_SetItemFrame
    CONTAINER_SetItemString        @329 ; CONTAINER_SetItemString
    CONTAINER_StepSize             @314 ; CONTAINER_StepSize
    CONTAINER_ValuePtr             @325 ; CONTAINER_ValuePtr
    DIB_Allocate                   @201 ; DIB_Allocate
    DIB_ColorCount                 @216 ; DIB_ColorCount
    DIB_ColorTableB                @231 ; DIB_ColorTableB
    DIB_ColorTableG                @230 ; DIB_ColorTableG
    DIB_ColorTableR                @229 ; DIB_ColorTableR
    DIB_Copy                       @228 ; DIB_Copy
    DIB_CreatePalette              @214 ; DIB_CreatePalette
    DIB_Depth                      @205 ; DIB_Depth
    DIB_DrawToDC                   @212 ; DIB_DrawToDC
    DIB_Free                       @215 ; DIB_Free
    DIB_GetFromClipboard           @227 ; DIB_GetFromClipboard
    DIB_Height                     @207 ; DIB_Height
    DIB_LoadFromFilename           @221 ; DIB_LoadFromFilename
    DIB_Lock                       @209 ; DIB_Lock
    DIB_PutOnClipboard             @224 ; DIB_PutOnClipboard
    DIB_ReadRow                    @213 ; DIB_ReadRow
    DIB_ReadRowRGB                 @232 ; DIB_ReadRowRGB
    DIB_RowBytes                   @208 ; DIB_RowBytes
    DIB_SetColorCount              @223 ; DIB_SetColorCount
    DIB_SetColorTableRGB           @218 ; DIB_SetColorTableRGB
    DIB_SetGrayColorTable          @217 ; DIB_SetGrayColorTable
    DIB_SetResolution              @202 ; DIB_SetResolution
    DIB_SwapRedBlue                @222 ; DIB_SwapRedBlue
    DIB_Unlock                     @210 ; DIB_Unlock
    DIB_Width                      @206 ; DIB_Width
    DIB_WriteRow                   @211 ; DIB_WriteRow
    DIB_WriteRowChannel            @226 ; DIB_WriteRowChannel
    DIB_WriteToBmp                 @219 ; DIB_WriteToBmp
    DIB_WriteToBmpFile             @225 ; DIB_WriteToBmpFile
    DIB_WriteToJpeg                @220 ; DIB_WriteToJpeg
    DIB_XResolution                @203 ; DIB_XResolution
    DIB_YResolution                @204 ; DIB_YResolution
    DllMain                        @27  ; DllMain
    TWAIN_AbortAllPendingXfers     @1   ; TWAIN_AbortAllPendingXfers
    TWAIN_Acquire                  @101 ; TWAIN_Acquire
    TWAIN_AcquireFile              @142 ; TWAIN_AcquireFile
    TWAIN_AcquireMemory            @89  ; TWAIN_AcquireMemory
    TWAIN_AcquireMemoryCallback    @143 ; TWAIN_AcquireMemoryCallback
    TWAIN_AcquireNative            @2   ; TWAIN_AcquireNative
    TWAIN_AcquireToClipboard       @3   ; TWAIN_AcquireToClipboard
    TWAIN_AcquireToFilename        @4   ; TWAIN_AcquireToFilename
    TWAIN_BreakModalLoop           @59  ; TWAIN_BreakModalLoop
    TWAIN_BuildName                @73  ; TWAIN_BuildName
    TWAIN_ClearError               @55  ; TWAIN_ClearError
    TWAIN_CloseSource              @5   ; TWAIN_CloseSource
    TWAIN_CloseSourceManager       @6   ; TWAIN_CloseSourceManager
    TWAIN_Compression              @104 ; TWAIN_Compression
    TWAIN_CreateDibPalette         @7   ; TWAIN_CreateDibPalette
    TWAIN_DS                       @8   ; TWAIN_DS
    TWAIN_DibDepth                 @9   ; TWAIN_DibDepth
    TWAIN_DibHeight                @10  ; TWAIN_DibHeight
    TWAIN_DibNumColors             @11  ; TWAIN_DibNumColors
    TWAIN_DibReadRow               @71  ; TWAIN_DibReadRow
    TWAIN_DibRowBytes              @70  ; TWAIN_DibRowBytes
    TWAIN_DibWidth                 @12  ; TWAIN_DibWidth
    TWAIN_DisableParent            @144 ; TWAIN_DisableParent
    TWAIN_DisableSource            @13  ; TWAIN_DisableSource
    TWAIN_DrawDibToDC              @14  ; TWAIN_DrawDibToDC
    TWAIN_EasyVersion              @15  ; TWAIN_EasyVersion
    TWAIN_EnableDuplex             @126 ; TWAIN_EnableDuplex
    TWAIN_EnableSource             @16  ; TWAIN_EnableSource
    TWAIN_EndXfer                  @53  ; TWAIN_EndXfer
    TWAIN_ErrorBox                 @51  ; TWAIN_ErrorBox
    TWAIN_Fix32ToFloat             @63  ; TWAIN_Fix32ToFloat
    TWAIN_FreeNative               @17  ; TWAIN_FreeNative
    TWAIN_Get                      @78  ; TWAIN_Get
    TWAIN_GetBitDepth              @18  ; TWAIN_GetBitDepth
    TWAIN_GetBuildName             @88  ; TWAIN_GetBuildName
    TWAIN_GetCapBool               @72  ; TWAIN_GetCapBool
    TWAIN_GetCapCurrent            @19  ; TWAIN_GetCapCurrent
    TWAIN_GetCapFix32              @76  ; TWAIN_GetCapFix32
    TWAIN_GetCapUint16             @77  ; TWAIN_GetCapUint16
    TWAIN_GetConditionCode         @20  ; TWAIN_GetConditionCode
    TWAIN_GetCurrent               @80  ; TWAIN_GetCurrent
    TWAIN_GetCurrentResolution     @21  ; TWAIN_GetCurrentResolution
    TWAIN_GetCurrentThreshold      @75  ; TWAIN_GetCurrentThreshold
    TWAIN_GetCurrentUnits          @22  ; TWAIN_GetCurrentUnits
    TWAIN_GetDefault               @79  ; TWAIN_GetDefault
    TWAIN_GetDefaultImageLayout    @149 ; TWAIN_GetDefaultImageLayout
    TWAIN_GetDefaultSourceName     @140 ; TWAIN_GetDefaultSourceName
    TWAIN_GetDisableParent         @145 ; TWAIN_GetDisableParent
    TWAIN_GetDuplexSupport         @125 ; TWAIN_GetDuplexSupport
    TWAIN_GetHideUI                @23  ; TWAIN_GetHideUI
    TWAIN_GetImageLayout           @148 ; TWAIN_GetImageLayout
    TWAIN_GetJpegQuality           @133 ; TWAIN_GetJpegQuality
    TWAIN_GetMultiTransfer         @69  ; TWAIN_GetMultiTransfer
    TWAIN_GetNextSourceName        @139 ; TWAIN_GetNextSourceName
    TWAIN_GetPixelType             @24  ; TWAIN_GetPixelType
    TWAIN_GetResultCode            @25  ; TWAIN_GetResultCode
    TWAIN_GetSaveFormat            @131 ; TWAIN_GetSaveFormat
    TWAIN_GetSourceList            @138 ; TWAIN_GetSourceList
    TWAIN_GetSourceName            @135 ; TWAIN_GetSourceName
    TWAIN_GetYResolution           @64  ; TWAIN_GetYResolution
    TWAIN_HasControllableUI        @121 ; TWAIN_HasControllableUI
    TWAIN_HasFeeder                @115 ; TWAIN_HasFeeder
    TWAIN_IsAutoFeedOn             @118 ; TWAIN_IsAutoFeedOn
    TWAIN_IsAvailable              @26  ; TWAIN_IsAvailable
    TWAIN_IsDuplexEnabled          @127 ; TWAIN_IsDuplexEnabled
    TWAIN_IsFeederLoaded           @122 ; TWAIN_IsFeederLoaded
    TWAIN_IsFeederSelected         @116 ; TWAIN_IsFeederSelected
    TWAIN_IsJpegAvailable          @134 ; TWAIN_IsJpegAvailable
    TWAIN_IsTransferReady          @146 ; TWAIN_IsTransferReady
    TWAIN_LastErrorCode            @56  ; TWAIN_LastErrorCode
    TWAIN_LoadNativeFromFilename   @28  ; TWAIN_LoadNativeFromFilename
    TWAIN_LoadSourceManager        @29  ; TWAIN_LoadSourceManager
    TWAIN_LogFile                  @151 ; TWAIN_LogFile
    TWAIN_MessageHook              @30  ; TWAIN_MessageHook
    TWAIN_Mgr                      @31  ; TWAIN_Mgr
    TWAIN_ModalEventLoop           @32  ; TWAIN_ModalEventLoop
    TWAIN_NegotiatePixelTypes      @33  ; TWAIN_NegotiatePixelTypes
    TWAIN_NegotiateXferCount       @34  ; TWAIN_NegotiateXferCount
    TWAIN_OpenDefaultSource        @35  ; TWAIN_OpenDefaultSource
    TWAIN_OpenSource               @137 ; TWAIN_OpenSource
    TWAIN_OpenSourceManager        @36  ; TWAIN_OpenSourceManager
    TWAIN_PixelFlavor              @110 ; TWAIN_PixelFlavor
    TWAIN_PlanarChunky             @108 ; TWAIN_PlanarChunky
    TWAIN_RegisterApp              @37  ; TWAIN_RegisterApp
    TWAIN_ReportLastError          @50  ; TWAIN_ReportLastError
    TWAIN_Reset                    @82  ; TWAIN_Reset
    TWAIN_ResetImageLayout         @150 ; TWAIN_ResetImageLayout
    TWAIN_SelectFeeder             @117 ; TWAIN_SelectFeeder
    TWAIN_SelectImageSource        @38  ; TWAIN_SelectImageSource
    TWAIN_SelfTest                 @147 ; TWAIN_SelfTest
    TWAIN_Set                      @81  ; TWAIN_Set
    TWAIN_SetAppTitle              @152 ; TWAIN_SetAppTitle
    TWAIN_SetAutoBright            @83  ; TWAIN_SetAutoBright
    TWAIN_SetAutoFeed              @119 ; TWAIN_SetAutoFeed
    TWAIN_SetBitDepth              @39  ; TWAIN_SetBitDepth
    TWAIN_SetBrightness            @61  ; TWAIN_SetBrightness
    TWAIN_SetCapFix32              @87  ; TWAIN_SetCapFix32
    TWAIN_SetCapFix32R             @128 ; TWAIN_SetCapFix32R
    TWAIN_SetCapOneValue           @40  ; TWAIN_SetCapOneValue
    TWAIN_SetCompression           @105 ; TWAIN_SetCompression
    TWAIN_SetContrast              @60  ; TWAIN_SetContrast
    TWAIN_SetCurrentPixelType      @41  ; TWAIN_SetCurrentPixelType
    TWAIN_SetCurrentResolution     @42  ; TWAIN_SetCurrentResolution
    TWAIN_SetCurrentUnits          @43  ; TWAIN_SetCurrentUnits
    TWAIN_SetGamma                 @102 ; TWAIN_SetGamma
    TWAIN_SetHideUI                @44  ; TWAIN_SetHideUI
    TWAIN_SetHighlight             @86  ; TWAIN_SetHighlight
    TWAIN_SetImageLayout           @113 ; TWAIN_SetImageLayout
    TWAIN_SetIndicators            @120 ; TWAIN_SetIndicators
    TWAIN_SetJpegQuality           @132 ; TWAIN_SetJpegQuality
    TWAIN_SetLightPath             @103 ; TWAIN_SetLightPath
    TWAIN_SetMultiTransfer         @68  ; TWAIN_SetMultiTransfer
    TWAIN_SetPaperSize             @84  ; TWAIN_SetPaperSize
    TWAIN_SetPixelFlavor           @111 ; TWAIN_SetPixelFlavor
    TWAIN_SetPlanarChunky          @109 ; TWAIN_SetPlanarChunky
    TWAIN_SetSaveFormat            @130 ; TWAIN_SetSaveFormat
    TWAIN_SetShadow                @85  ; TWAIN_SetShadow
    TWAIN_SetThreshold             @74  ; TWAIN_SetThreshold
    TWAIN_SetTiled                 @107 ; TWAIN_SetTiled
    TWAIN_SetXResolution           @123 ; TWAIN_SetXResolution
    TWAIN_SetXferMech              @66  ; TWAIN_SetXferMech
    TWAIN_SetYResolution           @124 ; TWAIN_SetYResolution
    TWAIN_SourceName               @136 ; TWAIN_SourceName
    TWAIN_State                    @45  ; TWAIN_State
    TWAIN_SupportsFileXfer         @141 ; TWAIN_SupportsFileXfer
    TWAIN_SuppressErrorMessages    @52  ; TWAIN_SuppressErrorMessages
    TWAIN_Testing123               @67  ; TWAIN_Testing123
    TWAIN_Tiled                    @106 ; TWAIN_Tiled
    TWAIN_ToFix32                  @62  ; TWAIN_ToFix32
    TWAIN_ToFix32R                 @129 ; TWAIN_ToFix32R
    TWAIN_UnloadSourceManager      @46  ; TWAIN_UnloadSourceManager
    TWAIN_UserClosedSource         @57  ; TWAIN_UserClosedSource
    TWAIN_WaitForNativeXfer        @54  ; TWAIN_WaitForNativeXfer
    TWAIN_WriteNativeToFilename    @49  ; TWAIN_WriteNativeToFilename
    TWAIN_XferMech                 @65  ; TWAIN_XferMech

 
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sun Apr 08, 2012 3:41 pm

Generado con

impdef -a twain2.def eztwain.dll


Code: Select all  Expand view


LIBRARY     EZTW32.DLL

EXPORTS
    _CONTAINER_Array              = CONTAINER_Array                     ; CONTAINER_Array
    _CONTAINER_ContainsValue      = CONTAINER_ContainsValue             ; CONTAINER_ContainsValue
    _CONTAINER_Copy               = CONTAINER_Copy                      ; CONTAINER_Copy
    _CONTAINER_CurrentIndex       = CONTAINER_CurrentIndex              ; CONTAINER_CurrentIndex
    _CONTAINER_CurrentValue       = CONTAINER_CurrentValue              ; CONTAINER_CurrentValue
    _CONTAINER_DefaultIndex       = CONTAINER_DefaultIndex              ; CONTAINER_DefaultIndex
    _CONTAINER_DefaultValue       = CONTAINER_DefaultValue              ; CONTAINER_DefaultValue
    _CONTAINER_DeleteItem         = CONTAINER_DeleteItem                ; CONTAINER_DeleteItem
    _CONTAINER_Enumeration        = CONTAINER_Enumeration               ; CONTAINER_Enumeration
    _CONTAINER_FindValue          = CONTAINER_FindValue                 ; CONTAINER_FindValue
    _CONTAINER_FloatValue         = CONTAINER_FloatValue                ; CONTAINER_FloatValue
    _CONTAINER_Format             = CONTAINER_Format                    ; CONTAINER_Format
    _CONTAINER_Free               = CONTAINER_Free                      ; CONTAINER_Free
    _CONTAINER_InsertItem         = CONTAINER_InsertItem                ; CONTAINER_InsertItem
    _CONTAINER_IntValue           = CONTAINER_IntValue                  ; CONTAINER_IntValue
    _CONTAINER_ItemCount          = CONTAINER_ItemCount                 ; CONTAINER_ItemCount
    _CONTAINER_ItemType           = CONTAINER_ItemType                  ; CONTAINER_ItemType
    _CONTAINER_MaxValue           = CONTAINER_MaxValue                  ; CONTAINER_MaxValue
    _CONTAINER_MinValue           = CONTAINER_MinValue                  ; CONTAINER_MinValue
    _CONTAINER_OneValue           = CONTAINER_OneValue                  ; CONTAINER_OneValue
    _CONTAINER_Range              = CONTAINER_Range                     ; CONTAINER_Range
    _CONTAINER_SelectCurrentItem  = CONTAINER_SelectCurrentItem         ; CONTAINER_SelectCurrentItem
    _CONTAINER_SelectCurrentValue = CONTAINER_SelectCurrentValue        ; CONTAINER_SelectCurrentValue
    _CONTAINER_SelectDefaultItem  = CONTAINER_SelectDefaultItem         ; CONTAINER_SelectDefaultItem
    _CONTAINER_SelectDefaultValue = CONTAINER_SelectDefaultValue        ; CONTAINER_SelectDefaultValue
    _CONTAINER_SetItem            = CONTAINER_SetItem                   ; CONTAINER_SetItem
    _CONTAINER_SetItemFrame       = CONTAINER_SetItemFrame              ; CONTAINER_SetItemFrame
    _CONTAINER_SetItemString      = CONTAINER_SetItemString             ; CONTAINER_SetItemString
    _CONTAINER_StepSize           = CONTAINER_StepSize                  ; CONTAINER_StepSize
    _CONTAINER_ValuePtr           = CONTAINER_ValuePtr                  ; CONTAINER_ValuePtr
    _DIB_Allocate                 = DIB_Allocate                        ; DIB_Allocate
    _DIB_ColorCount               = DIB_ColorCount                      ; DIB_ColorCount
    _DIB_ColorTableB              = DIB_ColorTableB                     ; DIB_ColorTableB
    _DIB_ColorTableG              = DIB_ColorTableG                     ; DIB_ColorTableG
    _DIB_ColorTableR              = DIB_ColorTableR                     ; DIB_ColorTableR
    _DIB_Copy                     = DIB_Copy                            ; DIB_Copy
    _DIB_CreatePalette            = DIB_CreatePalette                   ; DIB_CreatePalette
    _DIB_Depth                    = DIB_Depth                           ; DIB_Depth
    _DIB_DrawToDC                 = DIB_DrawToDC                        ; DIB_DrawToDC
    _DIB_Free                     = DIB_Free                            ; DIB_Free
    _DIB_GetFromClipboard         = DIB_GetFromClipboard                ; DIB_GetFromClipboard
    _DIB_Height                   = DIB_Height                          ; DIB_Height
    _DIB_LoadFromFilename         = DIB_LoadFromFilename                ; DIB_LoadFromFilename
    _DIB_Lock                     = DIB_Lock                            ; DIB_Lock
    _DIB_PutOnClipboard           = DIB_PutOnClipboard                  ; DIB_PutOnClipboard
    _DIB_ReadRow                  = DIB_ReadRow                         ; DIB_ReadRow
    _DIB_ReadRowRGB               = DIB_ReadRowRGB                      ; DIB_ReadRowRGB
    _DIB_RowBytes                 = DIB_RowBytes                        ; DIB_RowBytes
    _DIB_SetColorCount            = DIB_SetColorCount                   ; DIB_SetColorCount
    _DIB_SetColorTableRGB         = DIB_SetColorTableRGB                ; DIB_SetColorTableRGB
    _DIB_SetGrayColorTable        = DIB_SetGrayColorTable               ; DIB_SetGrayColorTable
    _DIB_SetResolution            = DIB_SetResolution                   ; DIB_SetResolution
    _DIB_SwapRedBlue              = DIB_SwapRedBlue                     ; DIB_SwapRedBlue
    _DIB_Unlock                   = DIB_Unlock                          ; DIB_Unlock
    _DIB_Width                    = DIB_Width                           ; DIB_Width
    _DIB_WriteRow                 = DIB_WriteRow                        ; DIB_WriteRow
    _DIB_WriteRowChannel          = DIB_WriteRowChannel                 ; DIB_WriteRowChannel
    _DIB_WriteToBmp               = DIB_WriteToBmp                      ; DIB_WriteToBmp
    _DIB_WriteToBmpFile           = DIB_WriteToBmpFile                  ; DIB_WriteToBmpFile
    _DIB_WriteToJpeg              = DIB_WriteToJpeg                     ; DIB_WriteToJpeg
    _DIB_XResolution              = DIB_XResolution                     ; DIB_XResolution
    _DIB_YResolution              = DIB_YResolution                     ; DIB_YResolution
    _DllMain                      = DllMain                             ; DllMain
    _TWAIN_AbortAllPendingXfers   = TWAIN_AbortAllPendingXfers          ; TWAIN_AbortAllPendingXfers
    _TWAIN_Acquire                = TWAIN_Acquire                       ; TWAIN_Acquire
    _TWAIN_AcquireFile            = TWAIN_AcquireFile                   ; TWAIN_AcquireFile
    _TWAIN_AcquireMemory          = TWAIN_AcquireMemory                 ; TWAIN_AcquireMemory
    _TWAIN_AcquireMemoryCallback  = TWAIN_AcquireMemoryCallback         ; TWAIN_AcquireMemoryCallback
    _TWAIN_AcquireNative          = TWAIN_AcquireNative                 ; TWAIN_AcquireNative
    _TWAIN_AcquireToClipboard     = TWAIN_AcquireToClipboard            ; TWAIN_AcquireToClipboard
    _TWAIN_AcquireToFilename      = TWAIN_AcquireToFilename             ; TWAIN_AcquireToFilename
    _TWAIN_BreakModalLoop         = TWAIN_BreakModalLoop                ; TWAIN_BreakModalLoop
    _TWAIN_BuildName              = TWAIN_BuildName                     ; TWAIN_BuildName
    _TWAIN_ClearError             = TWAIN_ClearError                    ; TWAIN_ClearError
    _TWAIN_CloseSource            = TWAIN_CloseSource                   ; TWAIN_CloseSource
    _TWAIN_CloseSourceManager     = TWAIN_CloseSourceManager            ; TWAIN_CloseSourceManager
    _TWAIN_Compression            = TWAIN_Compression                   ; TWAIN_Compression
    _TWAIN_CreateDibPalette       = TWAIN_CreateDibPalette              ; TWAIN_CreateDibPalette
    _TWAIN_DS                     = TWAIN_DS                            ; TWAIN_DS
    _TWAIN_DibDepth               = TWAIN_DibDepth                      ; TWAIN_DibDepth
    _TWAIN_DibHeight              = TWAIN_DibHeight                     ; TWAIN_DibHeight
    _TWAIN_DibNumColors           = TWAIN_DibNumColors                  ; TWAIN_DibNumColors
    _TWAIN_DibReadRow             = TWAIN_DibReadRow                    ; TWAIN_DibReadRow
    _TWAIN_DibRowBytes            = TWAIN_DibRowBytes                   ; TWAIN_DibRowBytes
    _TWAIN_DibWidth               = TWAIN_DibWidth                      ; TWAIN_DibWidth
    _TWAIN_DisableParent          = TWAIN_DisableParent                 ; TWAIN_DisableParent
    _TWAIN_DisableSource          = TWAIN_DisableSource                 ; TWAIN_DisableSource
    _TWAIN_DrawDibToDC            = TWAIN_DrawDibToDC                   ; TWAIN_DrawDibToDC
    _TWAIN_EasyVersion            = TWAIN_EasyVersion                   ; TWAIN_EasyVersion
    _TWAIN_EnableDuplex           = TWAIN_EnableDuplex                  ; TWAIN_EnableDuplex
    _TWAIN_EnableSource           = TWAIN_EnableSource                  ; TWAIN_EnableSource
    _TWAIN_EndXfer                = TWAIN_EndXfer                       ; TWAIN_EndXfer
    _TWAIN_ErrorBox               = TWAIN_ErrorBox                      ; TWAIN_ErrorBox
    _TWAIN_Fix32ToFloat           = TWAIN_Fix32ToFloat                  ; TWAIN_Fix32ToFloat
    _TWAIN_FreeNative             = TWAIN_FreeNative                    ; TWAIN_FreeNative
    _TWAIN_Get                    = TWAIN_Get                           ; TWAIN_Get
    _TWAIN_GetBitDepth            = TWAIN_GetBitDepth                   ; TWAIN_GetBitDepth
    _TWAIN_GetBuildName           = TWAIN_GetBuildName                  ; TWAIN_GetBuildName
    _TWAIN_GetCapBool             = TWAIN_GetCapBool                    ; TWAIN_GetCapBool
    _TWAIN_GetCapCurrent          = TWAIN_GetCapCurrent                 ; TWAIN_GetCapCurrent
    _TWAIN_GetCapFix32            = TWAIN_GetCapFix32                   ; TWAIN_GetCapFix32
    _TWAIN_GetCapUint16           = TWAIN_GetCapUint16                  ; TWAIN_GetCapUint16
    _TWAIN_GetConditionCode       = TWAIN_GetConditionCode              ; TWAIN_GetConditionCode
    _TWAIN_GetCurrent             = TWAIN_GetCurrent                    ; TWAIN_GetCurrent
    _TWAIN_GetCurrentResolution   = TWAIN_GetCurrentResolution          ; TWAIN_GetCurrentResolution
    _TWAIN_GetCurrentThreshold    = TWAIN_GetCurrentThreshold           ; TWAIN_GetCurrentThreshold
    _TWAIN_GetCurrentUnits        = TWAIN_GetCurrentUnits               ; TWAIN_GetCurrentUnits
    _TWAIN_GetDefault             = TWAIN_GetDefault                    ; TWAIN_GetDefault
    _TWAIN_GetDefaultImageLayout  = TWAIN_GetDefaultImageLayout         ; TWAIN_GetDefaultImageLayout
    _TWAIN_GetDefaultSourceName   = TWAIN_GetDefaultSourceName          ; TWAIN_GetDefaultSourceName
    _TWAIN_GetDisableParent       = TWAIN_GetDisableParent              ; TWAIN_GetDisableParent
    _TWAIN_GetDuplexSupport       = TWAIN_GetDuplexSupport              ; TWAIN_GetDuplexSupport
    _TWAIN_GetHideUI              = TWAIN_GetHideUI                     ; TWAIN_GetHideUI
    _TWAIN_GetImageLayout         = TWAIN_GetImageLayout                ; TWAIN_GetImageLayout
    _TWAIN_GetJpegQuality         = TWAIN_GetJpegQuality                ; TWAIN_GetJpegQuality
    _TWAIN_GetMultiTransfer       = TWAIN_GetMultiTransfer              ; TWAIN_GetMultiTransfer
    _TWAIN_GetNextSourceName      = TWAIN_GetNextSourceName             ; TWAIN_GetNextSourceName
    _TWAIN_GetPixelType           = TWAIN_GetPixelType                  ; TWAIN_GetPixelType
    _TWAIN_GetResultCode          = TWAIN_GetResultCode                 ; TWAIN_GetResultCode
    _TWAIN_GetSaveFormat          = TWAIN_GetSaveFormat                 ; TWAIN_GetSaveFormat
    _TWAIN_GetSourceList          = TWAIN_GetSourceList                 ; TWAIN_GetSourceList
    _TWAIN_GetSourceName          = TWAIN_GetSourceName                 ; TWAIN_GetSourceName
    _TWAIN_GetYResolution         = TWAIN_GetYResolution                ; TWAIN_GetYResolution
    _TWAIN_HasControllableUI      = TWAIN_HasControllableUI             ; TWAIN_HasControllableUI
    _TWAIN_HasFeeder              = TWAIN_HasFeeder                     ; TWAIN_HasFeeder
    _TWAIN_IsAutoFeedOn           = TWAIN_IsAutoFeedOn                  ; TWAIN_IsAutoFeedOn
    _TWAIN_IsAvailable            = TWAIN_IsAvailable                   ; TWAIN_IsAvailable
    _TWAIN_IsDuplexEnabled        = TWAIN_IsDuplexEnabled               ; TWAIN_IsDuplexEnabled
    _TWAIN_IsFeederLoaded         = TWAIN_IsFeederLoaded                ; TWAIN_IsFeederLoaded
    _TWAIN_IsFeederSelected       = TWAIN_IsFeederSelected              ; TWAIN_IsFeederSelected
    _TWAIN_IsJpegAvailable        = TWAIN_IsJpegAvailable               ; TWAIN_IsJpegAvailable
    _TWAIN_IsTransferReady        = TWAIN_IsTransferReady               ; TWAIN_IsTransferReady
    _TWAIN_LastErrorCode          = TWAIN_LastErrorCode                 ; TWAIN_LastErrorCode
    _TWAIN_LoadNativeFromFilename = TWAIN_LoadNativeFromFilename        ; TWAIN_LoadNativeFromFilename
    _TWAIN_LoadSourceManager      = TWAIN_LoadSourceManager             ; TWAIN_LoadSourceManager
    _TWAIN_LogFile                = TWAIN_LogFile                       ; TWAIN_LogFile
    _TWAIN_MessageHook            = TWAIN_MessageHook                   ; TWAIN_MessageHook
    _TWAIN_Mgr                    = TWAIN_Mgr                           ; TWAIN_Mgr
    _TWAIN_ModalEventLoop         = TWAIN_ModalEventLoop                ; TWAIN_ModalEventLoop
    _TWAIN_NegotiatePixelTypes    = TWAIN_NegotiatePixelTypes           ; TWAIN_NegotiatePixelTypes
    _TWAIN_NegotiateXferCount     = TWAIN_NegotiateXferCount            ; TWAIN_NegotiateXferCount
    _TWAIN_OpenDefaultSource      = TWAIN_OpenDefaultSource             ; TWAIN_OpenDefaultSource
    _TWAIN_OpenSource             = TWAIN_OpenSource                    ; TWAIN_OpenSource
    _TWAIN_OpenSourceManager      = TWAIN_OpenSourceManager             ; TWAIN_OpenSourceManager
    _TWAIN_PixelFlavor            = TWAIN_PixelFlavor                   ; TWAIN_PixelFlavor
    _TWAIN_PlanarChunky           = TWAIN_PlanarChunky                  ; TWAIN_PlanarChunky
    _TWAIN_RegisterApp            = TWAIN_RegisterApp                   ; TWAIN_RegisterApp
    _TWAIN_ReportLastError        = TWAIN_ReportLastError               ; TWAIN_ReportLastError
    _TWAIN_Reset                  = TWAIN_Reset                         ; TWAIN_Reset
    _TWAIN_ResetImageLayout       = TWAIN_ResetImageLayout              ; TWAIN_ResetImageLayout
    _TWAIN_SelectFeeder           = TWAIN_SelectFeeder                  ; TWAIN_SelectFeeder
    _TWAIN_SelectImageSource      = TWAIN_SelectImageSource             ; TWAIN_SelectImageSource
    _TWAIN_SelfTest               = TWAIN_SelfTest                      ; TWAIN_SelfTest
    _TWAIN_Set                    = TWAIN_Set                           ; TWAIN_Set
    _TWAIN_SetAppTitle            = TWAIN_SetAppTitle                   ; TWAIN_SetAppTitle
    _TWAIN_SetAutoBright          = TWAIN_SetAutoBright                 ; TWAIN_SetAutoBright
    _TWAIN_SetAutoFeed            = TWAIN_SetAutoFeed                   ; TWAIN_SetAutoFeed
    _TWAIN_SetBitDepth            = TWAIN_SetBitDepth                   ; TWAIN_SetBitDepth
    _TWAIN_SetBrightness          = TWAIN_SetBrightness                 ; TWAIN_SetBrightness
    _TWAIN_SetCapFix32            = TWAIN_SetCapFix32                   ; TWAIN_SetCapFix32
    _TWAIN_SetCapFix32R           = TWAIN_SetCapFix32R                  ; TWAIN_SetCapFix32R
    _TWAIN_SetCapOneValue         = TWAIN_SetCapOneValue                ; TWAIN_SetCapOneValue
    _TWAIN_SetCompression         = TWAIN_SetCompression                ; TWAIN_SetCompression
    _TWAIN_SetContrast            = TWAIN_SetContrast                   ; TWAIN_SetContrast
    _TWAIN_SetCurrentPixelType    = TWAIN_SetCurrentPixelType           ; TWAIN_SetCurrentPixelType
    _TWAIN_SetCurrentResolution   = TWAIN_SetCurrentResolution          ; TWAIN_SetCurrentResolution
    _TWAIN_SetCurrentUnits        = TWAIN_SetCurrentUnits               ; TWAIN_SetCurrentUnits
    _TWAIN_SetGamma               = TWAIN_SetGamma                      ; TWAIN_SetGamma
    _TWAIN_SetHideUI              = TWAIN_SetHideUI                     ; TWAIN_SetHideUI
    _TWAIN_SetHighlight           = TWAIN_SetHighlight                  ; TWAIN_SetHighlight
    _TWAIN_SetImageLayout         = TWAIN_SetImageLayout                ; TWAIN_SetImageLayout
    _TWAIN_SetIndicators          = TWAIN_SetIndicators                 ; TWAIN_SetIndicators
    _TWAIN_SetJpegQuality         = TWAIN_SetJpegQuality                ; TWAIN_SetJpegQuality
    _TWAIN_SetLightPath           = TWAIN_SetLightPath                  ; TWAIN_SetLightPath
    _TWAIN_SetMultiTransfer       = TWAIN_SetMultiTransfer              ; TWAIN_SetMultiTransfer
    _TWAIN_SetPaperSize           = TWAIN_SetPaperSize                  ; TWAIN_SetPaperSize
    _TWAIN_SetPixelFlavor         = TWAIN_SetPixelFlavor                ; TWAIN_SetPixelFlavor
    _TWAIN_SetPlanarChunky        = TWAIN_SetPlanarChunky               ; TWAIN_SetPlanarChunky
    _TWAIN_SetSaveFormat          = TWAIN_SetSaveFormat                 ; TWAIN_SetSaveFormat
    _TWAIN_SetShadow              = TWAIN_SetShadow                     ; TWAIN_SetShadow
    _TWAIN_SetThreshold           = TWAIN_SetThreshold                  ; TWAIN_SetThreshold
    _TWAIN_SetTiled               = TWAIN_SetTiled                      ; TWAIN_SetTiled
    _TWAIN_SetXResolution         = TWAIN_SetXResolution                ; TWAIN_SetXResolution
    _TWAIN_SetXferMech            = TWAIN_SetXferMech                   ; TWAIN_SetXferMech
    _TWAIN_SetYResolution         = TWAIN_SetYResolution                ; TWAIN_SetYResolution
    _TWAIN_SourceName             = TWAIN_SourceName                    ; TWAIN_SourceName
    _TWAIN_State                  = TWAIN_State                         ; TWAIN_State
    _TWAIN_SupportsFileXfer       = TWAIN_SupportsFileXfer              ; TWAIN_SupportsFileXfer
    _TWAIN_SuppressErrorMessages  = TWAIN_SuppressErrorMessages         ; TWAIN_SuppressErrorMessages
    _TWAIN_Testing123             = TWAIN_Testing123                    ; TWAIN_Testing123
    _TWAIN_Tiled                  = TWAIN_Tiled                         ; TWAIN_Tiled
    _TWAIN_ToFix32                = TWAIN_ToFix32                       ; TWAIN_ToFix32
    _TWAIN_ToFix32R               = TWAIN_ToFix32R                      ; TWAIN_ToFix32R
    _TWAIN_UnloadSourceManager    = TWAIN_UnloadSourceManager           ; TWAIN_UnloadSourceManager
    _TWAIN_UserClosedSource       = TWAIN_UserClosedSource              ; TWAIN_UserClosedSource
    _TWAIN_WaitForNativeXfer      = TWAIN_WaitForNativeXfer             ; TWAIN_WaitForNativeXfer
    _TWAIN_WriteNativeToFilename  = TWAIN_WriteNativeToFilename         ; TWAIN_WriteNativeToFilename
    _TWAIN_XferMech               = TWAIN_XferMech                      ; TWAIN_XferMech

 
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sun Apr 08, 2012 3:43 pm

Generado asi:

impdef -aa twain3.def eztw32.dll

Code: Select all  Expand view


LIBRARY     EZTW32.DLL

EXPORTS
    _CONTAINER_Array              = CONTAINER_Array                     ; CONTAINER_Array
    _CONTAINER_ContainsValue      = CONTAINER_ContainsValue             ; CONTAINER_ContainsValue
    _CONTAINER_Copy               = CONTAINER_Copy                      ; CONTAINER_Copy
    _CONTAINER_CurrentIndex       = CONTAINER_CurrentIndex              ; CONTAINER_CurrentIndex
    _CONTAINER_CurrentValue       = CONTAINER_CurrentValue              ; CONTAINER_CurrentValue
    _CONTAINER_DefaultIndex       = CONTAINER_DefaultIndex              ; CONTAINER_DefaultIndex
    _CONTAINER_DefaultValue       = CONTAINER_DefaultValue              ; CONTAINER_DefaultValue
    _CONTAINER_DeleteItem         = CONTAINER_DeleteItem                ; CONTAINER_DeleteItem
    _CONTAINER_Enumeration        = CONTAINER_Enumeration               ; CONTAINER_Enumeration
    _CONTAINER_FindValue          = CONTAINER_FindValue                 ; CONTAINER_FindValue
    _CONTAINER_FloatValue         = CONTAINER_FloatValue                ; CONTAINER_FloatValue
    _CONTAINER_Format             = CONTAINER_Format                    ; CONTAINER_Format
    _CONTAINER_Free               = CONTAINER_Free                      ; CONTAINER_Free
    _CONTAINER_InsertItem         = CONTAINER_InsertItem                ; CONTAINER_InsertItem
    _CONTAINER_IntValue           = CONTAINER_IntValue                  ; CONTAINER_IntValue
    _CONTAINER_ItemCount          = CONTAINER_ItemCount                 ; CONTAINER_ItemCount
    _CONTAINER_ItemType           = CONTAINER_ItemType                  ; CONTAINER_ItemType
    _CONTAINER_MaxValue           = CONTAINER_MaxValue                  ; CONTAINER_MaxValue
    _CONTAINER_MinValue           = CONTAINER_MinValue                  ; CONTAINER_MinValue
    _CONTAINER_OneValue           = CONTAINER_OneValue                  ; CONTAINER_OneValue
    _CONTAINER_Range              = CONTAINER_Range                     ; CONTAINER_Range
    _CONTAINER_SelectCurrentItem  = CONTAINER_SelectCurrentItem         ; CONTAINER_SelectCurrentItem
    _CONTAINER_SelectCurrentValue = CONTAINER_SelectCurrentValue        ; CONTAINER_SelectCurrentValue
    _CONTAINER_SelectDefaultItem  = CONTAINER_SelectDefaultItem         ; CONTAINER_SelectDefaultItem
    _CONTAINER_SelectDefaultValue = CONTAINER_SelectDefaultValue        ; CONTAINER_SelectDefaultValue
    _CONTAINER_SetItem            = CONTAINER_SetItem                   ; CONTAINER_SetItem
    _CONTAINER_SetItemFrame       = CONTAINER_SetItemFrame              ; CONTAINER_SetItemFrame
    _CONTAINER_SetItemString      = CONTAINER_SetItemString             ; CONTAINER_SetItemString
    _CONTAINER_StepSize           = CONTAINER_StepSize                  ; CONTAINER_StepSize
    _CONTAINER_ValuePtr           = CONTAINER_ValuePtr                  ; CONTAINER_ValuePtr
    _DIB_Allocate                 = DIB_Allocate                        ; DIB_Allocate
    _DIB_ColorCount               = DIB_ColorCount                      ; DIB_ColorCount
    _DIB_ColorTableB              = DIB_ColorTableB                     ; DIB_ColorTableB
    _DIB_ColorTableG              = DIB_ColorTableG                     ; DIB_ColorTableG
    _DIB_ColorTableR              = DIB_ColorTableR                     ; DIB_ColorTableR
    _DIB_Copy                     = DIB_Copy                            ; DIB_Copy
    _DIB_CreatePalette            = DIB_CreatePalette                   ; DIB_CreatePalette
    _DIB_Depth                    = DIB_Depth                           ; DIB_Depth
    _DIB_DrawToDC                 = DIB_DrawToDC                        ; DIB_DrawToDC
    _DIB_Free                     = DIB_Free                            ; DIB_Free
    _DIB_GetFromClipboard         = DIB_GetFromClipboard                ; DIB_GetFromClipboard
    _DIB_Height                   = DIB_Height                          ; DIB_Height
    _DIB_LoadFromFilename         = DIB_LoadFromFilename                ; DIB_LoadFromFilename
    _DIB_Lock                     = DIB_Lock                            ; DIB_Lock
    _DIB_PutOnClipboard           = DIB_PutOnClipboard                  ; DIB_PutOnClipboard
    _DIB_ReadRow                  = DIB_ReadRow                         ; DIB_ReadRow
    _DIB_ReadRowRGB               = DIB_ReadRowRGB                      ; DIB_ReadRowRGB
    _DIB_RowBytes                 = DIB_RowBytes                        ; DIB_RowBytes
    _DIB_SetColorCount            = DIB_SetColorCount                   ; DIB_SetColorCount
    _DIB_SetColorTableRGB         = DIB_SetColorTableRGB                ; DIB_SetColorTableRGB
    _DIB_SetGrayColorTable        = DIB_SetGrayColorTable               ; DIB_SetGrayColorTable
    _DIB_SetResolution            = DIB_SetResolution                   ; DIB_SetResolution
    _DIB_SwapRedBlue              = DIB_SwapRedBlue                     ; DIB_SwapRedBlue
    _DIB_Unlock                   = DIB_Unlock                          ; DIB_Unlock
    _DIB_Width                    = DIB_Width                           ; DIB_Width
    _DIB_WriteRow                 = DIB_WriteRow                        ; DIB_WriteRow
    _DIB_WriteRowChannel          = DIB_WriteRowChannel                 ; DIB_WriteRowChannel
    _DIB_WriteToBmp               = DIB_WriteToBmp                      ; DIB_WriteToBmp
    _DIB_WriteToBmpFile           = DIB_WriteToBmpFile                  ; DIB_WriteToBmpFile
    _DIB_WriteToJpeg              = DIB_WriteToJpeg                     ; DIB_WriteToJpeg
    _DIB_XResolution              = DIB_XResolution                     ; DIB_XResolution
    _DIB_YResolution              = DIB_YResolution                     ; DIB_YResolution
    _DllMain                      = DllMain                             ; DllMain
    _TWAIN_AbortAllPendingXfers   = TWAIN_AbortAllPendingXfers          ; TWAIN_AbortAllPendingXfers
    _TWAIN_Acquire                = TWAIN_Acquire                       ; TWAIN_Acquire
    _TWAIN_AcquireFile            = TWAIN_AcquireFile                   ; TWAIN_AcquireFile
    _TWAIN_AcquireMemory          = TWAIN_AcquireMemory                 ; TWAIN_AcquireMemory
    _TWAIN_AcquireMemoryCallback  = TWAIN_AcquireMemoryCallback         ; TWAIN_AcquireMemoryCallback
    _TWAIN_AcquireNative          = TWAIN_AcquireNative                 ; TWAIN_AcquireNative
    _TWAIN_AcquireToClipboard     = TWAIN_AcquireToClipboard            ; TWAIN_AcquireToClipboard
    _TWAIN_AcquireToFilename      = TWAIN_AcquireToFilename             ; TWAIN_AcquireToFilename
    _TWAIN_BreakModalLoop         = TWAIN_BreakModalLoop                ; TWAIN_BreakModalLoop
    _TWAIN_BuildName              = TWAIN_BuildName                     ; TWAIN_BuildName
    _TWAIN_ClearError             = TWAIN_ClearError                    ; TWAIN_ClearError
    _TWAIN_CloseSource            = TWAIN_CloseSource                   ; TWAIN_CloseSource
    _TWAIN_CloseSourceManager     = TWAIN_CloseSourceManager            ; TWAIN_CloseSourceManager
    _TWAIN_Compression            = TWAIN_Compression                   ; TWAIN_Compression
    _TWAIN_CreateDibPalette       = TWAIN_CreateDibPalette              ; TWAIN_CreateDibPalette
    _TWAIN_DS                     = TWAIN_DS                            ; TWAIN_DS
    _TWAIN_DibDepth               = TWAIN_DibDepth                      ; TWAIN_DibDepth
    _TWAIN_DibHeight              = TWAIN_DibHeight                     ; TWAIN_DibHeight
    _TWAIN_DibNumColors           = TWAIN_DibNumColors                  ; TWAIN_DibNumColors
    _TWAIN_DibReadRow             = TWAIN_DibReadRow                    ; TWAIN_DibReadRow
    _TWAIN_DibRowBytes            = TWAIN_DibRowBytes                   ; TWAIN_DibRowBytes
    _TWAIN_DibWidth               = TWAIN_DibWidth                      ; TWAIN_DibWidth
    _TWAIN_DisableParent          = TWAIN_DisableParent                 ; TWAIN_DisableParent
    _TWAIN_DisableSource          = TWAIN_DisableSource                 ; TWAIN_DisableSource
    _TWAIN_DrawDibToDC            = TWAIN_DrawDibToDC                   ; TWAIN_DrawDibToDC
    _TWAIN_EasyVersion            = TWAIN_EasyVersion                   ; TWAIN_EasyVersion
    _TWAIN_EnableDuplex           = TWAIN_EnableDuplex                  ; TWAIN_EnableDuplex
    _TWAIN_EnableSource           = TWAIN_EnableSource                  ; TWAIN_EnableSource
    _TWAIN_EndXfer                = TWAIN_EndXfer                       ; TWAIN_EndXfer
    _TWAIN_ErrorBox               = TWAIN_ErrorBox                      ; TWAIN_ErrorBox
    _TWAIN_Fix32ToFloat           = TWAIN_Fix32ToFloat                  ; TWAIN_Fix32ToFloat
    _TWAIN_FreeNative             = TWAIN_FreeNative                    ; TWAIN_FreeNative
    _TWAIN_Get                    = TWAIN_Get                           ; TWAIN_Get
    _TWAIN_GetBitDepth            = TWAIN_GetBitDepth                   ; TWAIN_GetBitDepth
    _TWAIN_GetBuildName           = TWAIN_GetBuildName                  ; TWAIN_GetBuildName
    _TWAIN_GetCapBool             = TWAIN_GetCapBool                    ; TWAIN_GetCapBool
    _TWAIN_GetCapCurrent          = TWAIN_GetCapCurrent                 ; TWAIN_GetCapCurrent
    _TWAIN_GetCapFix32            = TWAIN_GetCapFix32                   ; TWAIN_GetCapFix32
    _TWAIN_GetCapUint16           = TWAIN_GetCapUint16                  ; TWAIN_GetCapUint16
    _TWAIN_GetConditionCode       = TWAIN_GetConditionCode              ; TWAIN_GetConditionCode
    _TWAIN_GetCurrent             = TWAIN_GetCurrent                    ; TWAIN_GetCurrent
    _TWAIN_GetCurrentResolution   = TWAIN_GetCurrentResolution          ; TWAIN_GetCurrentResolution
    _TWAIN_GetCurrentThreshold    = TWAIN_GetCurrentThreshold           ; TWAIN_GetCurrentThreshold
    _TWAIN_GetCurrentUnits        = TWAIN_GetCurrentUnits               ; TWAIN_GetCurrentUnits
    _TWAIN_GetDefault             = TWAIN_GetDefault                    ; TWAIN_GetDefault
    _TWAIN_GetDefaultImageLayout  = TWAIN_GetDefaultImageLayout         ; TWAIN_GetDefaultImageLayout
    _TWAIN_GetDefaultSourceName   = TWAIN_GetDefaultSourceName          ; TWAIN_GetDefaultSourceName
    _TWAIN_GetDisableParent       = TWAIN_GetDisableParent              ; TWAIN_GetDisableParent
    _TWAIN_GetDuplexSupport       = TWAIN_GetDuplexSupport              ; TWAIN_GetDuplexSupport
    _TWAIN_GetHideUI              = TWAIN_GetHideUI                     ; TWAIN_GetHideUI
    _TWAIN_GetImageLayout         = TWAIN_GetImageLayout                ; TWAIN_GetImageLayout
    _TWAIN_GetJpegQuality         = TWAIN_GetJpegQuality                ; TWAIN_GetJpegQuality
    _TWAIN_GetMultiTransfer       = TWAIN_GetMultiTransfer              ; TWAIN_GetMultiTransfer
    _TWAIN_GetNextSourceName      = TWAIN_GetNextSourceName             ; TWAIN_GetNextSourceName
    _TWAIN_GetPixelType           = TWAIN_GetPixelType                  ; TWAIN_GetPixelType
    _TWAIN_GetResultCode          = TWAIN_GetResultCode                 ; TWAIN_GetResultCode
    _TWAIN_GetSaveFormat          = TWAIN_GetSaveFormat                 ; TWAIN_GetSaveFormat
    _TWAIN_GetSourceList          = TWAIN_GetSourceList                 ; TWAIN_GetSourceList
    _TWAIN_GetSourceName          = TWAIN_GetSourceName                 ; TWAIN_GetSourceName
    _TWAIN_GetYResolution         = TWAIN_GetYResolution                ; TWAIN_GetYResolution
    _TWAIN_HasControllableUI      = TWAIN_HasControllableUI             ; TWAIN_HasControllableUI
    _TWAIN_HasFeeder              = TWAIN_HasFeeder                     ; TWAIN_HasFeeder
    _TWAIN_IsAutoFeedOn           = TWAIN_IsAutoFeedOn                  ; TWAIN_IsAutoFeedOn
    _TWAIN_IsAvailable            = TWAIN_IsAvailable                   ; TWAIN_IsAvailable
    _TWAIN_IsDuplexEnabled        = TWAIN_IsDuplexEnabled               ; TWAIN_IsDuplexEnabled
    _TWAIN_IsFeederLoaded         = TWAIN_IsFeederLoaded                ; TWAIN_IsFeederLoaded
    _TWAIN_IsFeederSelected       = TWAIN_IsFeederSelected              ; TWAIN_IsFeederSelected
    _TWAIN_IsJpegAvailable        = TWAIN_IsJpegAvailable               ; TWAIN_IsJpegAvailable
    _TWAIN_IsTransferReady        = TWAIN_IsTransferReady               ; TWAIN_IsTransferReady
    _TWAIN_LastErrorCode          = TWAIN_LastErrorCode                 ; TWAIN_LastErrorCode
    _TWAIN_LoadNativeFromFilename = TWAIN_LoadNativeFromFilename        ; TWAIN_LoadNativeFromFilename
    _TWAIN_LoadSourceManager      = TWAIN_LoadSourceManager             ; TWAIN_LoadSourceManager
    _TWAIN_LogFile                = TWAIN_LogFile                       ; TWAIN_LogFile
    _TWAIN_MessageHook            = TWAIN_MessageHook                   ; TWAIN_MessageHook
    _TWAIN_Mgr                    = TWAIN_Mgr                           ; TWAIN_Mgr
    _TWAIN_ModalEventLoop         = TWAIN_ModalEventLoop                ; TWAIN_ModalEventLoop
    _TWAIN_NegotiatePixelTypes    = TWAIN_NegotiatePixelTypes           ; TWAIN_NegotiatePixelTypes
    _TWAIN_NegotiateXferCount     = TWAIN_NegotiateXferCount            ; TWAIN_NegotiateXferCount
    _TWAIN_OpenDefaultSource      = TWAIN_OpenDefaultSource             ; TWAIN_OpenDefaultSource
    _TWAIN_OpenSource             = TWAIN_OpenSource                    ; TWAIN_OpenSource
    _TWAIN_OpenSourceManager      = TWAIN_OpenSourceManager             ; TWAIN_OpenSourceManager
    _TWAIN_PixelFlavor            = TWAIN_PixelFlavor                   ; TWAIN_PixelFlavor
    _TWAIN_PlanarChunky           = TWAIN_PlanarChunky                  ; TWAIN_PlanarChunky
    _TWAIN_RegisterApp            = TWAIN_RegisterApp                   ; TWAIN_RegisterApp
    _TWAIN_ReportLastError        = TWAIN_ReportLastError               ; TWAIN_ReportLastError
    _TWAIN_Reset                  = TWAIN_Reset                         ; TWAIN_Reset
    _TWAIN_ResetImageLayout       = TWAIN_ResetImageLayout              ; TWAIN_ResetImageLayout
    _TWAIN_SelectFeeder           = TWAIN_SelectFeeder                  ; TWAIN_SelectFeeder
    _TWAIN_SelectImageSource      = TWAIN_SelectImageSource             ; TWAIN_SelectImageSource
    _TWAIN_SelfTest               = TWAIN_SelfTest                      ; TWAIN_SelfTest
    _TWAIN_Set                    = TWAIN_Set                           ; TWAIN_Set
    _TWAIN_SetAppTitle            = TWAIN_SetAppTitle                   ; TWAIN_SetAppTitle
    _TWAIN_SetAutoBright          = TWAIN_SetAutoBright                 ; TWAIN_SetAutoBright
    _TWAIN_SetAutoFeed            = TWAIN_SetAutoFeed                   ; TWAIN_SetAutoFeed
    _TWAIN_SetBitDepth            = TWAIN_SetBitDepth                   ; TWAIN_SetBitDepth
    _TWAIN_SetBrightness          = TWAIN_SetBrightness                 ; TWAIN_SetBrightness
    _TWAIN_SetCapFix32            = TWAIN_SetCapFix32                   ; TWAIN_SetCapFix32
    _TWAIN_SetCapFix32R           = TWAIN_SetCapFix32R                  ; TWAIN_SetCapFix32R
    _TWAIN_SetCapOneValue         = TWAIN_SetCapOneValue                ; TWAIN_SetCapOneValue
    _TWAIN_SetCompression         = TWAIN_SetCompression                ; TWAIN_SetCompression
    _TWAIN_SetContrast            = TWAIN_SetContrast                   ; TWAIN_SetContrast
    _TWAIN_SetCurrentPixelType    = TWAIN_SetCurrentPixelType           ; TWAIN_SetCurrentPixelType
    _TWAIN_SetCurrentResolution   = TWAIN_SetCurrentResolution          ; TWAIN_SetCurrentResolution
    _TWAIN_SetCurrentUnits        = TWAIN_SetCurrentUnits               ; TWAIN_SetCurrentUnits
    _TWAIN_SetGamma               = TWAIN_SetGamma                      ; TWAIN_SetGamma
    _TWAIN_SetHideUI              = TWAIN_SetHideUI                     ; TWAIN_SetHideUI
    _TWAIN_SetHighlight           = TWAIN_SetHighlight                  ; TWAIN_SetHighlight
    _TWAIN_SetImageLayout         = TWAIN_SetImageLayout                ; TWAIN_SetImageLayout
    _TWAIN_SetIndicators          = TWAIN_SetIndicators                 ; TWAIN_SetIndicators
    _TWAIN_SetJpegQuality         = TWAIN_SetJpegQuality                ; TWAIN_SetJpegQuality
    _TWAIN_SetLightPath           = TWAIN_SetLightPath                  ; TWAIN_SetLightPath
    _TWAIN_SetMultiTransfer       = TWAIN_SetMultiTransfer              ; TWAIN_SetMultiTransfer
    _TWAIN_SetPaperSize           = TWAIN_SetPaperSize                  ; TWAIN_SetPaperSize
    _TWAIN_SetPixelFlavor         = TWAIN_SetPixelFlavor                ; TWAIN_SetPixelFlavor
    _TWAIN_SetPlanarChunky        = TWAIN_SetPlanarChunky               ; TWAIN_SetPlanarChunky
    _TWAIN_SetSaveFormat          = TWAIN_SetSaveFormat                 ; TWAIN_SetSaveFormat
    _TWAIN_SetShadow              = TWAIN_SetShadow                     ; TWAIN_SetShadow
    _TWAIN_SetThreshold           = TWAIN_SetThreshold                  ; TWAIN_SetThreshold
    _TWAIN_SetTiled               = TWAIN_SetTiled                      ; TWAIN_SetTiled
    _TWAIN_SetXResolution         = TWAIN_SetXResolution                ; TWAIN_SetXResolution
    _TWAIN_SetXferMech            = TWAIN_SetXferMech                   ; TWAIN_SetXferMech
    _TWAIN_SetYResolution         = TWAIN_SetYResolution                ; TWAIN_SetYResolution
    _TWAIN_SourceName             = TWAIN_SourceName                    ; TWAIN_SourceName
    _TWAIN_State                  = TWAIN_State                         ; TWAIN_State
    _TWAIN_SupportsFileXfer       = TWAIN_SupportsFileXfer              ; TWAIN_SupportsFileXfer
    _TWAIN_SuppressErrorMessages  = TWAIN_SuppressErrorMessages         ; TWAIN_SuppressErrorMessages
    _TWAIN_Testing123             = TWAIN_Testing123                    ; TWAIN_Testing123
    _TWAIN_Tiled                  = TWAIN_Tiled                         ; TWAIN_Tiled
    _TWAIN_ToFix32                = TWAIN_ToFix32                       ; TWAIN_ToFix32
    _TWAIN_ToFix32R               = TWAIN_ToFix32R                      ; TWAIN_ToFix32R
    _TWAIN_UnloadSourceManager    = TWAIN_UnloadSourceManager           ; TWAIN_UnloadSourceManager
    _TWAIN_UserClosedSource       = TWAIN_UserClosedSource              ; TWAIN_UserClosedSource
    _TWAIN_WaitForNativeXfer      = TWAIN_WaitForNativeXfer             ; TWAIN_WaitForNativeXfer
    _TWAIN_WriteNativeToFilename  = TWAIN_WriteNativeToFilename         ; TWAIN_WriteNativeToFilename
    _TWAIN_XferMech               = TWAIN_XferMech                      ; TWAIN_XferMech


 
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sun Apr 08, 2012 3:45 pm

Generado asi genera error de sintaxis al crear la lib

impdef -h twain4.def eztw32.dll

Code: Select all  Expand view


LIBRARY     EZTW32.DLL

EXPORTS
    CONTAINER_Array                @317  @0   ; CONTAINER_Array
    CONTAINER_ContainsValue        @308  @1   ; CONTAINER_ContainsValue
    CONTAINER_Copy                 @302  @2   ; CONTAINER_Copy
    CONTAINER_CurrentIndex         @324  @3   ; CONTAINER_CurrentIndex
    CONTAINER_CurrentValue         @310  @4   ; CONTAINER_CurrentValue
    CONTAINER_DefaultIndex         @323  @5   ; CONTAINER_DefaultIndex
    CONTAINER_DefaultValue         @311  @6   ; CONTAINER_DefaultValue
    CONTAINER_DeleteItem           @321  @7   ; CONTAINER_DeleteItem
    CONTAINER_Enumeration          @318  @8   ; CONTAINER_Enumeration
    CONTAINER_FindValue            @309  @9   ; CONTAINER_FindValue
    CONTAINER_FloatValue           @306  @10  ; CONTAINER_FloatValue
    CONTAINER_Format               @303  @11  ; CONTAINER_Format
    CONTAINER_Free                 @301  @12  ; CONTAINER_Free
    CONTAINER_InsertItem           @322  @13  ; CONTAINER_InsertItem
    CONTAINER_IntValue             @307  @14  ; CONTAINER_IntValue
    CONTAINER_ItemCount            @305  @15  ; CONTAINER_ItemCount
    CONTAINER_ItemType             @304  @16  ; CONTAINER_ItemType
    CONTAINER_MaxValue             @313  @17  ; CONTAINER_MaxValue
    CONTAINER_MinValue             @312  @18  ; CONTAINER_MinValue
    CONTAINER_OneValue             @315  @19  ; CONTAINER_OneValue
    CONTAINER_Range                @316  @20  ; CONTAINER_Range
    CONTAINER_SelectCurrentItem    @320  @21  ; CONTAINER_SelectCurrentItem
    CONTAINER_SelectCurrentValue   @328  @22  ; CONTAINER_SelectCurrentValue
    CONTAINER_SelectDefaultItem    @327  @23  ; CONTAINER_SelectDefaultItem
    CONTAINER_SelectDefaultValue   @326  @24  ; CONTAINER_SelectDefaultValue
    CONTAINER_SetItem              @319  @25  ; CONTAINER_SetItem
    CONTAINER_SetItemFrame         @330  @26  ; CONTAINER_SetItemFrame
    CONTAINER_SetItemString        @329  @27  ; CONTAINER_SetItemString
    CONTAINER_StepSize             @314  @28  ; CONTAINER_StepSize
    CONTAINER_ValuePtr             @325  @29  ; CONTAINER_ValuePtr
    DIB_Allocate                   @201  @30  ; DIB_Allocate
    DIB_ColorCount                 @216  @31  ; DIB_ColorCount
    DIB_ColorTableB                @231  @32  ; DIB_ColorTableB
    DIB_ColorTableG                @230  @33  ; DIB_ColorTableG
    DIB_ColorTableR                @229  @34  ; DIB_ColorTableR
    DIB_Copy                       @228  @35  ; DIB_Copy
    DIB_CreatePalette              @214  @36  ; DIB_CreatePalette
    DIB_Depth                      @205  @37  ; DIB_Depth
    DIB_DrawToDC                   @212  @38  ; DIB_DrawToDC
    DIB_Free                       @215  @39  ; DIB_Free
    DIB_GetFromClipboard           @227  @40  ; DIB_GetFromClipboard
    DIB_Height                     @207  @41  ; DIB_Height
    DIB_LoadFromFilename           @221  @42  ; DIB_LoadFromFilename
    DIB_Lock                       @209  @43  ; DIB_Lock
    DIB_PutOnClipboard             @224  @44  ; DIB_PutOnClipboard
    DIB_ReadRow                    @213  @45  ; DIB_ReadRow
    DIB_ReadRowRGB                 @232  @46  ; DIB_ReadRowRGB
    DIB_RowBytes                   @208  @47  ; DIB_RowBytes
    DIB_SetColorCount              @223  @48  ; DIB_SetColorCount
    DIB_SetColorTableRGB           @218  @49  ; DIB_SetColorTableRGB
    DIB_SetGrayColorTable          @217  @50  ; DIB_SetGrayColorTable
    DIB_SetResolution              @202  @51  ; DIB_SetResolution
    DIB_SwapRedBlue                @222  @52  ; DIB_SwapRedBlue
    DIB_Unlock                     @210  @53  ; DIB_Unlock
    DIB_Width                      @206  @54  ; DIB_Width
    DIB_WriteRow                   @211  @55  ; DIB_WriteRow
    DIB_WriteRowChannel            @226  @56  ; DIB_WriteRowChannel
    DIB_WriteToBmp                 @219  @57  ; DIB_WriteToBmp
    DIB_WriteToBmpFile             @225  @58  ; DIB_WriteToBmpFile
    DIB_WriteToJpeg                @220  @59  ; DIB_WriteToJpeg
    DIB_XResolution                @203  @60  ; DIB_XResolution
    DIB_YResolution                @204  @61  ; DIB_YResolution
    DllMain                        @27   @62  ; DllMain
    TWAIN_AbortAllPendingXfers     @1    @63  ; TWAIN_AbortAllPendingXfers
    TWAIN_Acquire                  @101  @64  ; TWAIN_Acquire
    TWAIN_AcquireFile              @142  @65  ; TWAIN_AcquireFile
    TWAIN_AcquireMemory            @89   @66  ; TWAIN_AcquireMemory
    TWAIN_AcquireMemoryCallback    @143  @67  ; TWAIN_AcquireMemoryCallback
    TWAIN_AcquireNative            @2    @68  ; TWAIN_AcquireNative
    TWAIN_AcquireToClipboard       @3    @69  ; TWAIN_AcquireToClipboard
    TWAIN_AcquireToFilename        @4    @70  ; TWAIN_AcquireToFilename
    TWAIN_BreakModalLoop           @59   @71  ; TWAIN_BreakModalLoop
    TWAIN_BuildName                @73   @72  ; TWAIN_BuildName
    TWAIN_ClearError               @55   @73  ; TWAIN_ClearError
    TWAIN_CloseSource              @5    @74  ; TWAIN_CloseSource
    TWAIN_CloseSourceManager       @6    @75  ; TWAIN_CloseSourceManager
    TWAIN_Compression              @104  @76  ; TWAIN_Compression
    TWAIN_CreateDibPalette         @7    @77  ; TWAIN_CreateDibPalette
    TWAIN_DS                       @8    @78  ; TWAIN_DS
    TWAIN_DibDepth                 @9    @79  ; TWAIN_DibDepth
    TWAIN_DibHeight                @10   @80  ; TWAIN_DibHeight
    TWAIN_DibNumColors             @11   @81  ; TWAIN_DibNumColors
    TWAIN_DibReadRow               @71   @82  ; TWAIN_DibReadRow
    TWAIN_DibRowBytes              @70   @83  ; TWAIN_DibRowBytes
    TWAIN_DibWidth                 @12   @84  ; TWAIN_DibWidth
    TWAIN_DisableParent            @144  @85  ; TWAIN_DisableParent
    TWAIN_DisableSource            @13   @86  ; TWAIN_DisableSource
    TWAIN_DrawDibToDC              @14   @87  ; TWAIN_DrawDibToDC
    TWAIN_EasyVersion              @15   @88  ; TWAIN_EasyVersion
    TWAIN_EnableDuplex             @126  @89  ; TWAIN_EnableDuplex
    TWAIN_EnableSource             @16   @90  ; TWAIN_EnableSource
    TWAIN_EndXfer                  @53   @91  ; TWAIN_EndXfer
    TWAIN_ErrorBox                 @51   @92  ; TWAIN_ErrorBox
    TWAIN_Fix32ToFloat             @63   @93  ; TWAIN_Fix32ToFloat
    TWAIN_FreeNative               @17   @94  ; TWAIN_FreeNative
    TWAIN_Get                      @78   @95  ; TWAIN_Get
    TWAIN_GetBitDepth              @18   @96  ; TWAIN_GetBitDepth
    TWAIN_GetBuildName             @88   @97  ; TWAIN_GetBuildName
    TWAIN_GetCapBool               @72   @98  ; TWAIN_GetCapBool
    TWAIN_GetCapCurrent            @19   @99  ; TWAIN_GetCapCurrent
    TWAIN_GetCapFix32              @76   @100 ; TWAIN_GetCapFix32
    TWAIN_GetCapUint16             @77   @101 ; TWAIN_GetCapUint16
    TWAIN_GetConditionCode         @20   @102 ; TWAIN_GetConditionCode
    TWAIN_GetCurrent               @80   @103 ; TWAIN_GetCurrent
    TWAIN_GetCurrentResolution     @21   @104 ; TWAIN_GetCurrentResolution
    TWAIN_GetCurrentThreshold      @75   @105 ; TWAIN_GetCurrentThreshold
    TWAIN_GetCurrentUnits          @22   @106 ; TWAIN_GetCurrentUnits
    TWAIN_GetDefault               @79   @107 ; TWAIN_GetDefault
    TWAIN_GetDefaultImageLayout    @149  @108 ; TWAIN_GetDefaultImageLayout
    TWAIN_GetDefaultSourceName     @140  @109 ; TWAIN_GetDefaultSourceName
    TWAIN_GetDisableParent         @145  @110 ; TWAIN_GetDisableParent
    TWAIN_GetDuplexSupport         @125  @111 ; TWAIN_GetDuplexSupport
    TWAIN_GetHideUI                @23   @112 ; TWAIN_GetHideUI
    TWAIN_GetImageLayout           @148  @113 ; TWAIN_GetImageLayout
    TWAIN_GetJpegQuality           @133  @114 ; TWAIN_GetJpegQuality
    TWAIN_GetMultiTransfer         @69   @115 ; TWAIN_GetMultiTransfer
    TWAIN_GetNextSourceName        @139  @116 ; TWAIN_GetNextSourceName
    TWAIN_GetPixelType             @24   @117 ; TWAIN_GetPixelType
    TWAIN_GetResultCode            @25   @118 ; TWAIN_GetResultCode
    TWAIN_GetSaveFormat            @131  @119 ; TWAIN_GetSaveFormat
    TWAIN_GetSourceList            @138  @120 ; TWAIN_GetSourceList
    TWAIN_GetSourceName            @135  @121 ; TWAIN_GetSourceName
    TWAIN_GetYResolution           @64   @122 ; TWAIN_GetYResolution
    TWAIN_HasControllableUI        @121  @123 ; TWAIN_HasControllableUI
    TWAIN_HasFeeder                @115  @124 ; TWAIN_HasFeeder
    TWAIN_IsAutoFeedOn             @118  @125 ; TWAIN_IsAutoFeedOn
    TWAIN_IsAvailable              @26   @126 ; TWAIN_IsAvailable
    TWAIN_IsDuplexEnabled          @127  @127 ; TWAIN_IsDuplexEnabled
    TWAIN_IsFeederLoaded           @122  @128 ; TWAIN_IsFeederLoaded
    TWAIN_IsFeederSelected         @116  @129 ; TWAIN_IsFeederSelected
    TWAIN_IsJpegAvailable          @134  @130 ; TWAIN_IsJpegAvailable
    TWAIN_IsTransferReady          @146  @131 ; TWAIN_IsTransferReady
    TWAIN_LastErrorCode            @56   @132 ; TWAIN_LastErrorCode
    TWAIN_LoadNativeFromFilename   @28   @133 ; TWAIN_LoadNativeFromFilename
    TWAIN_LoadSourceManager        @29   @134 ; TWAIN_LoadSourceManager
    TWAIN_LogFile                  @151  @135 ; TWAIN_LogFile
    TWAIN_MessageHook              @30   @136 ; TWAIN_MessageHook
    TWAIN_Mgr                      @31   @137 ; TWAIN_Mgr
    TWAIN_ModalEventLoop           @32   @138 ; TWAIN_ModalEventLoop
    TWAIN_NegotiatePixelTypes      @33   @139 ; TWAIN_NegotiatePixelTypes
    TWAIN_NegotiateXferCount       @34   @140 ; TWAIN_NegotiateXferCount
    TWAIN_OpenDefaultSource        @35   @141 ; TWAIN_OpenDefaultSource
    TWAIN_OpenSource               @137  @142 ; TWAIN_OpenSource
    TWAIN_OpenSourceManager        @36   @143 ; TWAIN_OpenSourceManager
    TWAIN_PixelFlavor              @110  @144 ; TWAIN_PixelFlavor
    TWAIN_PlanarChunky             @108  @145 ; TWAIN_PlanarChunky
    TWAIN_RegisterApp              @37   @146 ; TWAIN_RegisterApp
    TWAIN_ReportLastError          @50   @147 ; TWAIN_ReportLastError
    TWAIN_Reset                    @82   @148 ; TWAIN_Reset
    TWAIN_ResetImageLayout         @150  @149 ; TWAIN_ResetImageLayout
    TWAIN_SelectFeeder             @117  @150 ; TWAIN_SelectFeeder
    TWAIN_SelectImageSource        @38   @151 ; TWAIN_SelectImageSource
    TWAIN_SelfTest                 @147  @152 ; TWAIN_SelfTest
    TWAIN_Set                      @81   @153 ; TWAIN_Set
    TWAIN_SetAppTitle              @152  @154 ; TWAIN_SetAppTitle
    TWAIN_SetAutoBright            @83   @155 ; TWAIN_SetAutoBright
    TWAIN_SetAutoFeed              @119  @156 ; TWAIN_SetAutoFeed
    TWAIN_SetBitDepth              @39   @157 ; TWAIN_SetBitDepth
    TWAIN_SetBrightness            @61   @158 ; TWAIN_SetBrightness
    TWAIN_SetCapFix32              @87   @159 ; TWAIN_SetCapFix32
    TWAIN_SetCapFix32R             @128  @160 ; TWAIN_SetCapFix32R
    TWAIN_SetCapOneValue           @40   @161 ; TWAIN_SetCapOneValue
    TWAIN_SetCompression           @105  @162 ; TWAIN_SetCompression
    TWAIN_SetContrast              @60   @163 ; TWAIN_SetContrast
    TWAIN_SetCurrentPixelType      @41   @164 ; TWAIN_SetCurrentPixelType
    TWAIN_SetCurrentResolution     @42   @165 ; TWAIN_SetCurrentResolution
    TWAIN_SetCurrentUnits          @43   @166 ; TWAIN_SetCurrentUnits
    TWAIN_SetGamma                 @102  @167 ; TWAIN_SetGamma
    TWAIN_SetHideUI                @44   @168 ; TWAIN_SetHideUI
    TWAIN_SetHighlight             @86   @169 ; TWAIN_SetHighlight
    TWAIN_SetImageLayout           @113  @170 ; TWAIN_SetImageLayout
    TWAIN_SetIndicators            @120  @171 ; TWAIN_SetIndicators
    TWAIN_SetJpegQuality           @132  @172 ; TWAIN_SetJpegQuality
    TWAIN_SetLightPath             @103  @173 ; TWAIN_SetLightPath
    TWAIN_SetMultiTransfer         @68   @174 ; TWAIN_SetMultiTransfer
    TWAIN_SetPaperSize             @84   @175 ; TWAIN_SetPaperSize
    TWAIN_SetPixelFlavor           @111  @176 ; TWAIN_SetPixelFlavor
    TWAIN_SetPlanarChunky          @109  @177 ; TWAIN_SetPlanarChunky
    TWAIN_SetSaveFormat            @130  @178 ; TWAIN_SetSaveFormat
    TWAIN_SetShadow                @85   @179 ; TWAIN_SetShadow
    TWAIN_SetThreshold             @74   @180 ; TWAIN_SetThreshold
    TWAIN_SetTiled                 @107  @181 ; TWAIN_SetTiled
    TWAIN_SetXResolution           @123  @182 ; TWAIN_SetXResolution
    TWAIN_SetXferMech              @66   @183 ; TWAIN_SetXferMech
    TWAIN_SetYResolution           @124  @184 ; TWAIN_SetYResolution
    TWAIN_SourceName               @136  @185 ; TWAIN_SourceName
    TWAIN_State                    @45   @186 ; TWAIN_State
    TWAIN_SupportsFileXfer         @141  @187 ; TWAIN_SupportsFileXfer
    TWAIN_SuppressErrorMessages    @52   @188 ; TWAIN_SuppressErrorMessages
    TWAIN_Testing123               @67   @189 ; TWAIN_Testing123
    TWAIN_Tiled                    @106  @190 ; TWAIN_Tiled
    TWAIN_ToFix32                  @62   @191 ; TWAIN_ToFix32
    TWAIN_ToFix32R                 @129  @192 ; TWAIN_ToFix32R
    TWAIN_UnloadSourceManager      @46   @193 ; TWAIN_UnloadSourceManager
    TWAIN_UserClosedSource         @57   @194 ; TWAIN_UserClosedSource
    TWAIN_WaitForNativeXfer        @54   @195 ; TWAIN_WaitForNativeXfer
    TWAIN_WriteNativeToFilename    @49   @196 ; TWAIN_WriteNativeToFilename
    TWAIN_XferMech                 @65   @197 ; TWAIN_XferMech


 
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sun Apr 08, 2012 3:45 pm

Este es el archivo eztwain.h

Code: Select all  Expand view


// EZTWAIN.H - interface to Easy TWAIN library
// Copyright (C) 1999-2001 by Dosadi.  All Rights Reserved.

/*---------------------------------------------------------------------
Licensing Terms - EZTWAIN 2.70

This is a legal agreement between you (or your employer if you are an
employee), and Dosadi (a company in Washington State, U.S.A.)
By using this EZTWAIN code ('EZTWAIN'), you and Dosadi agree as follows:

  1. EZTWAIN is and shall remain the property of Dosadi.

  2. Dosadi grants you a nonexclusive, world-wide, royalty-free
  license to use this code to create Windows applications for personal,
  educational, or not-for-profit use.

  3. You agree to redistribute EZTWAIN to others only as an integral
  component of a software or software/hardware system, and then
  only to other members of an educational or not-for-profit organization
  to which you belong.

  4. You agree to indemnify and hold Dosadi, its owners, officers and employees
  harmless from any liabilities arising out of your use of EZTWAIN.

  5. You may modify EZTWAIN.  Any such modified EZTWAIN is subject to this
  agreement just as the original is.

  6. Dosadi reserves all rights not specifically granted in this agreement.

  7. EZTWAIN is provided "as is", and Dosadi makes no warranty of any kind
  regarding EZTWAIN.

  8. Where this agreement is in conflict with applicable law, it shall be
  construed as having been written to conform to such law while
  while giving priority to the rights of Dosadi.

---------------------------------------------------------------------*/


// Download from:    www.dosadi.com
//
// Support contact:  support@dosadi.com
//
// To license the EZTWAIN code for commercial use within your company
// or in a product, send e-mail to:
//     sales@dosadi.com
//
// >>> Maintenance history is at the end of eztwain.c <<<


#ifndef EZTWAIN_H
#define EZTWAIN_H

#ifndef _WINDOWS_
#include "windows.h"
#endif

#ifdef __cplusplus
extern "C" {            /* Assume C declarations for C++ */
#endif  /* __cplusplus */

#ifndef EZTAPI
  #ifdef _WIN32
    #define EZTAPI WINAPI
  #else
    #define EZTAPI FAR PASCAL
  #endif
#endif

//--------- Test Call

HANDLE EZTAPI TWAIN_Testing123(LPCSTR pz, int n, HANDLE h, double d, unsigned u);
// Displays a dialog box with the parameter values in it.  Use this to
// test that you can call EZTWAIN and pass parameters correctly.
// It returns the value of the HANDLE h parameter.

//--------- Top-Level Calls

HANDLE EZTAPI TWAIN_Acquire(HWND hwndApp);
// Acquires a single image, from the currently selected Data Source, using
// EZTWAIN's preferred transfer mode.  *Currently the preferred mode is NATIVE*
//
// The minimal use of EZTWAIN.DLL is to call this function with a 0 argument.
//
// The return value is a handle to global memory containing a DIB -
// a Device-Independent Bitmap.  Numerous EZTWAIN DIB_xxx functions can
// be used to examine, modify, and save these DIB images.  Remember to
// use TWAIN_FreeNative to free each DIB when you are done with it!
//
// Normally only one image is acquired per call: All Acquire functions shut
// down TWAIN before returning.  Use TWAIN_SetMultiTransfer to change this.
//
// By default, the default data source (DS) is opened, displays its dialog,
// and determines all the parameters of the acquisition and transfer.
// If you want to (try to) hide the DS dialog, see TWAIN_SetHideUI.
// To set acquisition parameters, you need to do something like this:
//     TWAIN_OpenDefaultSource() -or- TWAIN_OpenSource(sourceName)
//     TWAIN_Set*        - one or more capability-setting functions
//     hdib = TWAIN_Acquire(hwnd)
//     if (hdib) { ... process image, TWAIN_FreeNative(hdib); }

void EZTAPI TWAIN_FreeNative(HANDLE hdib);
// Release the memory allocated to a DIB, as returned by
// TWAIN_AcquireNative. (If you are coding in C or C++, this is just a call
// to GlobalFree.)
// If you use TWAIN_AcquireNative and don't free the returned image handle,
// it stays around taking up Windows (virtual) memory until your application
// terminates.

int EZTAPI TWAIN_SelectImageSource(HWND hwnd);
// This is the routine to call when the user chooses the "Select Source..."
// menu command from your application's File menu.
// In the standard implementation of "Select Source...", your application
// doesn't need to do anything except make this one call.
// Note: If only one TWAIN device is installed on a system, it is selected
// automatically, so there is no need for the user to do Select Source.
// You should not require your users to do Select Source before Acquire.
//
// This function posts the Source Manager's Select Source dialog box.
// It returns after the user either OK's or CANCEL's that dialog.
// A return of 1 indicates OK, 0 indicates one of the following:
//   a) The user cancelled the dialog
//   b) The Source Manager found no data sources installed
//   c) There was a failure before the Select Source dialog could be posted
//
// If you want to be meticulous, disable your "Acquire" and "Select Source"
// menu items or buttons if TWAIN_IsAvailable() returns 0 - see below.
//
// To enumerate the available data sources, see:
//     TWAIN_GetSourceList and TWAIN_GetNextSourceName

HANDLE EZTAPI TWAIN_AcquireNative(HWND hwndApp, unsigned wPixTypes);
// Acquires a single image, from the currently selected Data Source, using
// Native Transfer Mode. It waits until the source closes (if it's modal) or
// forces the source closed if not.  The return value is a handle to the
// acquired image.  Only one image can be acquired per call.
//
// The return value is a handle to global memory containing a DIB -
// a Device-Independent Bitmap.  Numerous EZTWAIN functions can
// be used to examine, modify, and save these DIBs.  Remember to
// use TWAIN_FreeNative to free each DIB when you are done with it,
// these things eat up a lot of memory.
//
// For the 2nd parameter, you can OR or add together the following
// masks to indicate what kind(s) of image you prefer to receive.
// Caution: Some TWAIN devices will ignore your preference here.
// -- If you care, check the parameters of the DIB.

#define TWAIN_BW        0x0001  // 1-bit per pixel, B&W
#define TWAIN_GRAY      0x0002  // 1,4, or 8-bit grayscale
#define TWAIN_RGB       0x0004  // 24-bit RGB color
#define TWAIN_PALETTE   0x0008  // 1,4, or 8-bit palette

#define TWAIN_ANYTYPE   0x0000  // any of the above (use by itself)

int EZTAPI TWAIN_AcquireToClipboard(HWND hwndApp, unsigned wPixTypes);
// Like AcquireNative, but puts the resulting image, if any, into the
// system clipboard as a CF_DIB item. If this call fails, the clipboard is
// either empty or retains its previous content.
// Returns TRUE (1) for success, FALSE (0) for failure.
//
// Useful for environments like Visual Basic where it is hard to make direct
// use of a DIB handle.  In fact, TWAIN_AcquireToClipboard uses
// TWAIN_AcquireNative for all the hard work.

HANDLE EZTAPI TWAIN_AcquireMemory(HWND hwnd);
// Like TWAIN_Acquire, but always specifies a 'memory mode' transfer.

typedef BOOL (WINAPI *MEMXFERCALLBACK)(LPVOID data);

BOOL EZTAPI TWAIN_AcquireMemoryCallback(HWND hwnd, MEMXFERCALLBACK cb, LPVOID data);
// Like TWAIN_AcquireMemory, but you provide a call-back function.
// The call-back is called when the transfer is ready, and is responsible for
// setting up the transfer, transferring the data, and doing clean-up.
// See the function MemoryXferHandler in EZTWAIN.C for an example.

int EZTAPI TWAIN_AcquireToFilename(HWND hwndApp, LPCSTR pszFile);
// Acquire an image and write it to a file using the current Save Format,
// (See TWAIN_SetSaveFormat) which by default is BMP.
// If pszFile is NULL or an empty string, the user is prompted for
// the file name *and format* in a standard Save File dialog,
// See also TWAIN_AcquireFile below.
//
// Return values:
//  0  success.
// -1  the Acquire failed.
// -2  file open error (invalid path or name, or access denied)
// -3  invalid DIB, or image incompatible with file format, or...
// -4  writing failed, possibly output device is full.
// -10 user cancelled File Save dialog

int EZTAPI TWAIN_AcquireFile(HWND hwndApp, int nFF, LPCSTR pszFile);
// Acquire an image directly to a file, using the given format and filepath.
// * Unlike AcquireToFilename, this function uses TWAIN File Transfer Mode.
// * The image is written to disk by the Data Source, not by EZTWAIN.
// * Warning: This mode is -not- supported by all TWAIN devices.
//
// Use TWAIN_SupportsFileXfer to see if the open DS supports File Transfer.
//
// You can use TWAIN_Get(ICAP_IMAGEFILEFORMAT) to get an enumeration of
// the available file formats, and CONTAINER_ContainsValue to check for
// a particular format you are interested in.
//
// nFF can be any file format supported by the DS, see the TWFF_* constants
// in twain.h for the list of allowed formats.  A compliant DS should
// at least support TWFF_BMP, but as usual there are no guarantees.
//
// If pszFile is NULL or an empty string, the user is prompted for
// the file name in a standard Save File dialog.
//
// Return values (N.B. A Boolean, not an error code like AcquireToFilename!)
//  TRUE(1) for success
//  FALSE(0) for failure - use GetResultCode/GetConditionCode for details.
//  If the user cancels the Save File dialog, the result code is TWRC_CANCEL


//--------- Basic TWAIN Inquiries

int EZTAPI TWAIN_IsAvailable(void);
// Call this function any time to find out if TWAIN is installed on the
// system.  It takes a little time on the first call, after that it's fast,
// just testing a flag.  It returns 1 if the TWAIN Source Manager is
// installed & can be loaded, 0 otherwise.


int EZTAPI TWAIN_EasyVersion(void);
// Returns the version number of EZTWAIN.DLL, multiplied by 100.
// So e.g. version 2.01 will return 201 from this call.

int EZTAPI TWAIN_State(void);
// Returns the TWAIN Protocol State per the spec.
#define TWAIN_PRESESSION        1   // source manager not loaded
#define TWAIN_SM_LOADED         2   // source manager loaded
#define TWAIN_SM_OPEN           3   // source manager open
#define TWAIN_SOURCE_OPEN       4   // source open but not enabled
#define TWAIN_SOURCE_ENABLED    5   // source enabled to acquire
#define TWAIN_TRANSFER_READY    6   // image ready to transfer
#define TWAIN_TRANSFERRING      7   // image in transit

char* EZTAPI TWAIN_SourceName(void);
// Returns a pointer to the name of the currently or last opened source.
// Note: Even on NT or other Unicode-enabled platform, this is still
// a pointer to an 8-bit ASCII string.

void EZTAPI TWAIN_GetSourceName(LPSTR pzName);
// Like TWAIN_SourceName, but copies current/last source name into pzName.
// Please allocate enough space - 256 char at least.


//--------- DIB handling utilities ---------

void     EZTAPI DIB_SetResolution(HANDLE hdib, double xdpi, double ydpi);
// Sets the horizontal and vertical resolution of the DIB.
double   EZTAPI DIB_XResolution(HANDLE hdib);
// Horizontal (x) resolution of DIB, in DPI (dots per inch)
double   EZTAPI DIB_YResolution(HANDLE hdib);
// Vertical (y) resolution of DIB, in DPI (dots per inch)
int      EZTAPI DIB_Depth(HANDLE hdib);
// Depth of DIB, in bits i.e. bits per pixel.
int      EZTAPI DIB_Width(HANDLE hdib);
// Width of DIB, in pixels (columns)
int      EZTAPI DIB_Height(HANDLE hdib);
// Height of DIB, in lines (rows)
size_t   EZTAPI DIB_RowBytes(HANDLE hdib);
// Number of bytes needed to store one row of the DIB.
int      EZTAPI DIB_ColorCount(HANDLE hdib);
// Number of colors in color table of DIB

BITMAPINFOHEADER* EZTAPI DIB_Lock(HANDLE hdib);
// Lock the given DIB handle and return a pointer to the header structure.
// Technically, increments the lock count of hdib and returns its address.
void     EZTAPI DIB_Unlock(HANDLE hdib);
// Unlock the given DIB handle (decrement the lock count.)
// When the number of Unlocks = the number of Locks, any pointers
// into the DIB should be presumed invalid.

void     EZTAPI DIB_ReadRow(HANDLE hdib, int nRow, BYTE* prow);
void     EZTAPI DIB_ReadRowRGB(HANDLE hdib, int nRow, BYTE* prow);
// Read row n of the given DIB into buffer at prow.
// Caller is responsible for ensuring buffer is large enough.
// Row 0 is the *top* row of the image, as it would be displayed.
// The first variant reads the data as-is from the DIB, including
// BGR pixels from 24-bit DIBs, or packed 1-bit, 4-bit or 8-bit.
// The RGB variant unpacks every DIB pixel into 3-byte RGB pixels.

void     EZTAPI DIB_WriteRow(HANDLE hdib, int r, const BYTE* pdata);
// Write data from buffer into row r of the given DIB.
// Caller is responsible for ensuring buffer and row exist, etc.
void     EZTAPI DIB_WriteRowChannel(HANDLE hdib, int r, const BYTE* pdata, int nChannel);
// Write data from buffer into one color channel of row r of the given DIB.
// Channels are: 0=Red, 1=Green, 2=Blue.  If the DIB depth < 24, acts like WriteRow.

HANDLE   EZTAPI DIB_Allocate(int nDepth, int nWidth, int nHeight);
// Create a DIB with the given dimensions.  Resolution is set to 0.  A default
// color table is provided if depth <= 8.
// The image data is uninitialized i.e. garbage.

void EZTAPI DIB_Free(HANDLE hdib);
// Release the storage of the DIB.

HANDLE EZTAPI DIB_Copy(HANDLE hdib);
// Create and return a byte-for-byte copy of a DIB.

void     EZTAPI DIB_SetGrayColorTable(HANDLE hdib);
// Fill the DIB's color table with a gray ramp - so color 0 is black, and
// the last color (largest pixel value) is white.  No effect if depth > 8.
void     EZTAPI DIB_SetColorTableRGB(HANDLE hdib, int i, int R, int G, int B);
// Set the ith entry in the DIB's color table to the specified color.
// R G and B range from 0 to 255.

int EZTAPI DIB_ColorTableR(HANDLE hdib, int i);
int EZTAPI DIB_ColorTableG(HANDLE hdib, int i);
int EZTAPI DIB_ColorTableB(HANDLE hdib, int i);
// Return the R,G, or B component of the ith color table entry of a DIB.
// If i < 0 or >= DIB_ColorCount(hdib), returns 0.

void EZTAPI DIB_SwapRedBlue(HANDLE hdib);
// For 24-bit DIB only, exchange R and B components of each pixel.

HPALETTE EZTAPI DIB_CreatePalette(HANDLE hdib);
// Create and return a logical palette to be used for drawing the DIB.
// For 1, 4, and 8-bit DIBs the palette contains the DIB color table.
// For 24-bit DIBs, a default halftone palette is returned.

void EZTAPI DIB_SetColorCount(HANDLE hdib, int n);


void     EZTAPI DIB_DrawToDC(HANDLE hdib,   // DIB handle
                             HDC hDC,       // destination device context
                             int dx, int dy,// destination (x,y)
                             int w, int h,  // width and height
                             int sx, int sy // source (x,y) in DIB
                             );
// Draws DIB on a device context.
// You should call CreateDibPalette, select that palette
// into the DC, and do a RealizePalette(hDC) first.

int EZTAPI DIB_PutOnClipboard(HANDLE hdib);
// Place DIB on the clipboard (format CF_DIB)
// ** IMPORTANT ** After this call, the clipboard owns the
// DIB and you do not - you should erase your copy of the handle
// and do not attempt any subsequent operations on it.
// Treat this call just as you would a call to DIB_Free.
// Returns 1 = success, 0 = failure.

HANDLE EZTAPI DIB_GetFromClipboard(void);

int EZTAPI DIB_WriteToBmp(HANDLE hdib, LPCSTR pszFile);
int EZTAPI DIB_WriteToBmpFile(HANDLE hdib, HFILE fh);
int EZTAPI DIB_WriteToJpeg(HANDLE hdib, LPCSTR pszFile);

HANDLE EZTAPI DIB_LoadFromFilename(LPCSTR pszFile);

//--- OBSOLETE: The following functions are for backward compatibility only:
int EZTAPI TWAIN_DibDepth(HANDLE hdib);
int EZTAPI TWAIN_DibWidth(HANDLE hdib);
int EZTAPI TWAIN_DibHeight(HANDLE hdib);
int EZTAPI TWAIN_DibNumColors(HANDLE hdib);
long EZTAPI TWAIN_DibRowBytes(HANDLE hdib);
void EZTAPI TWAIN_DibReadRow(HANDLE hdib, int nRow, BYTE* prow);
HPALETTE EZTAPI TWAIN_CreateDibPalette(HANDLE hdib);
void EZTAPI TWAIN_DrawDibToDC(HDC hDC,int dx,int dy,int w,int h,HANDLE hdib,int sx, int sy);

//--------- File Read/Write

//---- File Formats
#define TWFF_BMP         2
#define TWFF_JFIF        4

int EZTAPI TWAIN_IsJpegAvailable(void);
// Return TRUE (1) if JPEG/JFIF image files can be read and written.
// Returns 0 if JPEG support has not been installed.

int EZTAPI TWAIN_SetSaveFormat(int nFF);
// Select the file format for subsequent calls to WriteNativeToFilename
// Displays a warning message if the format is not available.
// Returns TRUE (1) if ok, FALSE (0) if format is invalid or not available.
//  nFF  type    ext    notes
//   2   BMP    .bmp    uncompressed by default
//   4   JFIF   .jpg    JPEG File Interchange Format 1.02

int EZTAPI TWAIN_GetSaveFormat(void);
// Return the currently selected save format.

void EZTAPI TWAIN_SetJpegQuality(int nQ);
int EZTAPI TWAIN_GetJpegQuality(void);
// Set the 'quality' of subsequently saved JPEG/JFIF image files.
// nQ = 100 is maximum quality & minimum compression.
// nQ = 75 is 'good' quality, the default.
// nQ = 1 is minimum quality & maximum compression.

int EZTAPI TWAIN_WriteNativeToFilename(HANDLE hdib, LPCSTR pszFile);
// Writes a DIB handle to a file using the current save format.
//
// hdib     = DIB handle, as returned by TWAIN_AcquireNative
// pszFile  = far pointer to NUL-terminated filename
//
// If pszFile is NULL or points to a null string, the user is
// prompted for the filename *and format* with a standard Windows
// file-save dialog.
//
// Return values:
//   0  success
//  -1  user cancelled File Save dialog
//  -2  file open error (invalid path or name, or access denied)
//  -3  image is invalid, or cannot be written in this format.
//  -4  writing data failed, possibly output device is full


HANDLE EZTAPI TWAIN_LoadNativeFromFilename(LPCSTR pszFile);
// Load a .BMP file (or JPEG) and return a DIB handle.
// Accepts a filename (including path & extension).
// If pszFile is NULL or points to a null string, the user is
// prompted to choose a file with a standard File Open dialog.
// Returns a DIB handle if successful, otherwise NULL.

HANDLE EZTAPI TWAIN_LoadNativeFromFile(HFILE fh);


//--------- Global Options

void EZTAPI TWAIN_SetMultiTransfer(int fYes);
int EZTAPI TWAIN_GetMultiTransfer(void);
// This function controls the 'multiple transfers' flag.
// If this flag is non-zero: After an Acquire, the Data Source
// is not closed, but is left open to allow additional images
// to be acquired in the same session.  The programmer may
// need to close the Data Source after all images have been
// transferred, for example by calling
//     TWAIN_CloseSource or
//     TWAIN_UnloadSourceManager
//
// In multi-transfer mode, you can check for the availability of
// more images by calling TWAIN_State.  A state of 6 (TWAIN_TRANSFER_READY)
// means that the Data Source knows it has at least one more image.
// A state of 5 (TWAIN_SOURCE_ENABLED) means that the user has not
// closed the Data Source, so it might be able to acquire another image.
//
// See also: TWAIN_UserClosedSource()
//
// If you try to acquire and the Data Source can't do it, the acquire
// function will return an error indication.
//
// By default, this feature is set to FALSE (0).

void EZTAPI TWAIN_SetHideUI(int fHide);
int EZTAPI TWAIN_GetHideUI(void);
// These functions control the 'hide source user interface' flag.
// This flag is cleared initially, but if you set it non-zero, then when
// a source is enabled it will be asked to hide its user interface.
// Note that this is only a request - some sources will ignore it!
// This affects AcquireNative, AcquireToClipboard, and EnableSource.
// If the user interface is hidden, you will probably want to set at least
// some of the basic acquisition parameters yourself - see
// SetCurrentUnits, SetCurrentPixelType, SetBitDepth and
// SetCurrentResolution below.
// See also: HasControllableUI

void EZTAPI TWAIN_DisableParent(int fYes);
// Disable the parent window during _Acquire...
// (The parent window is the window you pass to the Acquire function.
// Typically this is your main application window or dialog.)
// By default this setting is TRUE - the parent
// window, if you provide it, is disabled during an Acquire.
//
// Note 1: If you set this to FALSE, your window can receive user input while
// an Acquire is in progress, and your code must be prepared for this.
// Note 2: Some TWAIN data sources will disable the parent window on their
// own, and EZTWAIN cannot prevent this.

int EZTAPI TWAIN_GetDisableParent(void);
// return current setting of 'disable parent' flag.

//--------- Application Registration

void EZTAPI TWAIN_RegisterApp(
    int   nMajorNum,      // major and incremental revision of application.
    int   nMinorNum,      // e.g. version 4.5: nMajorNum = 4, nMinorNum = 5
    int   nLanguage,      // (human) language (use TWLG_xxx from TWAIN.H)
    int   nCountry,       // country (use TWCY_xxx from TWAIN.H)
    LPCSTR lpszVersion,   // version info string e.g. "1.0b3 Beta release"
    LPCSTR lpszMfg,       // name of mfg/developer e.g. "Crazbat Software"
    LPCSTR lpszFamily,    // product family e.g. "BitStomper"
    LPCSTR lpszProduct);  // specific product e.g. "BitStomper Deluxe Pro"
//
// TWAIN_RegisterApp can be called *AS THE FIRST CALL*, to register the
// application. If this function is not called, the application is given a
// 'generic' registration by EZTWAIN.
// Registration only provides this information to the Source Manager and any
// sources you may open - it is used for debugging, and (frankly) by some
// sources to give special treatment to certain applications.

void EZTAPI TWAIN_SetAppTitle(LPCSTR lpszTitle);
// The short form.
// Sets the product name as far as TWAIN is concerned, and also the
// title of any dialog boxes / error boxes that are displayed by EZTWAIN.

//--------- Error Analysis and Reporting ------------------------------------

unsigned EZTAPI TWAIN_GetResultCode(void);
// Return the result code (TWRC_xxx) from the last triplet sent to TWAIN

unsigned EZTAPI TWAIN_GetConditionCode(void);
// Return the condition code from the last triplet sent to TWAIN.
// (To be precise, from the last call to TWAIN_DS below)
// If a source is NOT open, return the condition code of the source manager.

int EZTAPI TWAIN_UserClosedSource(void);
// Return TRUE (1) if during the last acquire the user asked
// the DataSource to close.  0 otherwise of course.
// This flag is cleared each time you start any kind of acquire,
// or just call ModalEventLoop, and it is set if EZTWAIN receives a
// MSG_XFERREADY message through TWAIN.

void EZTAPI TWAIN_ErrorBox(LPCSTR pzMsg);
// Post an error message dialog with an OK button,
// and the title 'TWAIN Error'.
// pszMsg points to a null-terminated message string.
// If messages are suppressed (see below) this function does nothing.

int EZTAPI TWAIN_SuppressErrorMessages(int nSuppress);
// Enable or disable EZTWAIN error messages to the user.
// When nSuppress = 0, error messages are displayed.
// When nSuppress <> 0, error messages are suppressed.
// By default, error messages are displayed.
// Note that EZTWAIN cannot prevent messages from TWAIN or DSs.
//
// Return the previous state of the flag.

void EZTAPI TWAIN_ReportLastError(LPCSTR pzMsg);
// Like TWAIN_ErrorBox, but if some details are available from
// TWAIN about the last failure, they are included in the message box.

typedef enum {
    EZTEC_NONE,
    EZTEC_START_TRIPLET_ERRS,
    EZTEC_CAP_GET,              // MSG_GET triplet on a capability failed
    EZTEC_CAP_SET,              // MSG_SET triplet on capability failed
    EZTEC_DSM_FAILURE,          // TWAIN DSM returned TWRC_FAILURE
    EZTEC_DS_FAILURE,           // source returned TWRC_FAILURE
    EZTEC_XFER_FAILURE,         // image transfer failed
    EZTEC_END_TRIPLET_ERRS,
    EZTEC_OPEN_DSM,             // opening DSM failed
    EZTEC_OPEN_DEFAULT_DS,
    EZTEC_NOT_STATE_4,          // operation invoked in wrong state
    EZTEC_NULL_HCON,            // MSG_GET returned a null container handle
    EZTEC_BAD_HCON,             // MSG_GET returned an invalid/unlockable container handle
    EZTEC_BAD_CONTYPE,          // returned container ConType is not valid.
    EZTEC_BAD_ITEMTYPE,         // returned container ItemType is not valid.
    EZTEC_CAP_GET_EMPTY,        // returned container has 0 items.
    EZTEC_CAP_SET_EMPTY,        // trying to restrict a cap to empty set
    EZTEC_INVALID_HWND,         // function passed an invalid window handle
    EZTEC_PROXY_WINDOW,         // internal proxy window create failed (unlikely!)
    EZTEC_USER_CANCEL,          // user cancelled operation
    EZTEC_RESOLUTION,           // Set failed for Resolution
} EZTWAIN_ERROR_CODE;


int EZTAPI TWAIN_LastErrorCode(void);
// Return the last internal EZTWAIN error code.

void EZTAPI TWAIN_ClearError(void);
// Set the EZTWAIN internal error code to EZTEC_NONE


//--------- TWAIN State Control ------------------------------------

int EZTAPI TWAIN_LoadSourceManager(void);
// Finds and loads the Data Source Manager, TWAIN.DLL.
// If Source Manager is already loaded, does nothing and returns TRUE.
// This can fail if TWAIN.DLL is not installed (in the right place), or
// if the library cannot load for some reason (insufficient memory?) or
// if TWAIN.DLL has been corrupted.

int EZTAPI TWAIN_OpenSourceManager(HWND hwnd);
// Opens the Data Source Manager, if not already open.
// If the Source Manager is already open, does nothing and returns TRUE.
// This call will fail if the Source Manager is not loaded.

int EZTAPI TWAIN_OpenDefaultSource(void);
// This opens the source selected in the Select Source dialog.
// If some source is already open, does nothing and returns TRUE.
// Will load and open the Source Manager if needed.
// If this call returns TRUE, TWAIN is in STATE 4 (TWAIN_SOURCE_OPEN)

// These two functions allow you to enumerate the available data sources:
int EZTAPI TWAIN_GetSourceList(void);
// Fetches the list of sources into memory, so they can be returned
// one by one by TWAIN_GetNextSourceName, below.
// Returns TRUE (1) if successful, FALSE (0) otherwise.

int EZTAPI TWAIN_GetNextSourceName(LPSTR pzName);
// Copies the next source name in the list into pzName.
// Returns TRUE (1) if successful, FALSE (0) if there are no more.

int EZTAPI TWAIN_GetDefaultSourceName(LPSTR pzName);
// Copies the name of the TWAIN default source into pzName.
// Normally returns TRUE (1) but will return FALSE (0) if:
//   - the TWAIN Source Manager cannot be loaded & initialized or
//   - there is no current default source (e.g. no sources are installed)

int EZTAPI TWAIN_OpenSource(LPCSTR pzName);
// Opens the source with the given name.
// If that source is already open, does nothing and returns TRUE
// If another source is open, closes it and attempts to open the specified source.
// Will load and open the Source Manager if needed.

int EZTAPI TWAIN_EnableSource(HWND hwnd);
// Enables the open Data Source. This posts the source's user interface
// and allows image acquisition to begin.  If the source is already enabled,
// this call does nothing and returns TRUE.

int EZTAPI TWAIN_DisableSource(void);
// Disables the open Data Source, if any.
// This closes the source's user interface.
// If there is not an enabled source, does nothing and returns TRUE.

int EZTAPI TWAIN_CloseSource(void);
// Closes the open Data Source, if any.
// If the source is enabled, disables it first.
// If there is not an open source, does nothing and returns TRUE.

int EZTAPI TWAIN_CloseSourceManager(HWND hwnd);
// Closes the Data Source Manager, if it is open.
// If a source is open, disables and closes it as needed.
// If the Source Manager is not open, does nothing and returns TRUE.

int EZTAPI TWAIN_UnloadSourceManager(void);
// Unloads the Data Source Manager i.e. TWAIN.DLL - releasing
// any associated memory or resources.
// If necessary, it will abort transfers, close the open source
// if any, and close the Source Manager.
// If successful, it returns 1 (TRUE)


int EZTAPI TWAIN_MessageHook(LPMSG lpmsg);
// This function detects Windows messages that should be routed
// to an enabled Data Source, and picks them off.  In a full TWAIN
// app, TWAIN_MessageHook is called inside the main GetMessage loop.
// The skeleton code looks like this:
//      MSG msg;
//      while (GetMessage((LPMSG)&msg, NULL, 0, 0)) {
//          if (!TWAIN_MessageHook ((LPMSG)&msg)) {
//              TranslateMessage ((LPMSG)&msg);
//              DispatchMessage ((LPMSG)&msg);
//          }
//      } // while


HANDLE EZTAPI TWAIN_WaitForNativeXfer(HWND hwnd);

int EZTAPI TWAIN_IsTransferReady(void);

void EZTAPI TWAIN_ModalEventLoop(void);
// Process messages until termination, source disable, or image transfer.


int EZTAPI TWAIN_EndXfer(void);

int EZTAPI TWAIN_AbortAllPendingXfers(void);

//--------- High-level Capability Negotiation Functions --------
// These functions should only be called in State 4 (TWAIN_SOURCE_OPEN)

int EZTAPI TWAIN_NegotiateXferCount(int nXfers);
// Negotiate with open Source the number of images application will accept.
// nXfers = -1 means any number
// Returns: 1 for success, 0 for failure.

int EZTAPI TWAIN_NegotiatePixelTypes(unsigned wPixTypes);
// Negotiate with the source to restrict pixel types that can be acquired.
// This tries to restrict the source to a *set* of pixel types.
// Returns: 1 for success, 0 for failure.
// See TWAIN_AcquireNative for some mask constants.
// A parameter of 0 (TWAIN_ANYTYPE) causes no negotiation & no restriction.
// You should not assume that the source will honor your restrictions, even
// if this call succeeds!

//----- Unit of Measure
// TWAIN unit codes (from twain.h)
#define TWUN_INCHES      0
#define TWUN_CENTIMETERS 1
#define TWUN_PICAS       2
#define TWUN_POINTS      3
#define TWUN_TWIPS       4
#define TWUN_PIXELS      5

int EZTAPI TWAIN_GetCurrentUnits(void);
// Return the current unit of measure: inches, cm, pixels, etc.
// Many TWAIN parameters such as resolution are set and returned
// in the current unit of measure.
// There is no error return - in case of error it returns 0 (TWUN_INCHES)

int EZTAPI TWAIN_SetCurrentUnits(int nUnits);
// Set the current unit of measure for the source.
// Common unit codes are given above.
// 1. Most sources do not support all units, some support *only* inches!
// 2. If you want to get or set resolution in DPI, make sure the current
// units are inches, or you might get Dots-Per-Centimeter!
// 3. Similarly for ImageLayout, see below.

int EZTAPI TWAIN_GetBitDepth(void);
// Get the current bitdepth, which can depend on the current PixelType.
// Bit depth is per color channel e.g. 24-bit RGB has bit depth 8.
// If anything goes wrong, this function returns 0.

int EZTAPI TWAIN_SetBitDepth(int nBits);
// (Try to) set the current bitdepth (for the current pixel type).
// Note: You should set a PixelType, then set the bitdepth for that type.

//------- TWAIN Pixel Types (from twain.h)
#define TWPT_BW          0 /* Black and White */
#define TWPT_GRAY        1
#define TWPT_RGB         2
#define TWPT_PALETTE     3

int EZTAPI TWAIN_GetPixelType(void);
// Ask the source for the current pixel type.
// If anything goes wrong (it shouldn't), this function returns 0 (TWPT_BW).

int EZTAPI TWAIN_SetCurrentPixelType(int nPixType);
// Try to set the current pixel type for acquisition.
// The source may select this pixel type, but don't assume it will.

double EZTAPI TWAIN_GetCurrentResolution(void);
// Ask the source for the current (horizontal) resolution.
// Resolution is in dots per current unit! (See TWAIN_GetCurrentUnits above)
// If anything goes wrong (it shouldn't) this function returns 0.0

double EZTAPI TWAIN_GetYResolution(void);
// Returns the current vertical resolution, in dots per *current unit*.
// In the event of failure, returns 0.0.

int EZTAPI TWAIN_SetCurrentResolution(double dRes);
// Try to set the current resolution (in both x & y).
// Resolution is in dots per current unit! (See TWAIN_GetCurrentUnits above)
// Note: The source may select this resolution, but don't assume it will.
int EZTAPI TWAIN_SetXResolution(double dxRes);
int EZTAPI TWAIN_SetYResolution(double dyRes);

int EZTAPI TWAIN_SetContrast(double dCon);
// Try to set the current contrast for acquisition.
// The TWAIN standard *says* that the range for this cap is -1000 ... +1000

int EZTAPI TWAIN_SetBrightness(double dBri);
// Try to set the current brightness for acquisition.
// The TWAIN standard *says* that the range for this cap is -1000 ... +1000

int EZTAPI TWAIN_SetThreshold(double dThresh);
// Try to set the threshold for black and white scanning.
// Should only affect 1-bit scans i.e. PixelType == TWPT_BW.
// The TWAIN default threshold value is 128.
// After staring at the TWAIN 1.6 spec for a while, I imagine that it implies
// that for 8-bit samples, values >= nThresh are thresholded to 1, others to 0.

double EZTAPI TWAIN_GetCurrentThreshold(void);
// Try to get and return the current value (MSG_GETCURRENT) of the
// ICAP_THRESHOLD capability.  If this fails for any reason, it
// will return -1.  *VERSIONS BEFORE 2.65 RETURNED 128.0*

int EZTAPI TWAIN_SetXferMech(int mech);
int EZTAPI TWAIN_XferMech(void);
// Try to set or get the transfer mode - one of the following:
#define XFERMECH_NATIVE    0
#define XFERMECH_FILE      1
#define XFERMECH_MEMORY    2
// You should not need to set this mode directly - using
// TWAIN_Acquire, TWAIN_AcquireNative and TWAIN_AcquireFile will set
// the appropriate transfer mode for you.

int EZTAPI TWAIN_SupportsFileXfer(void);
// Returns TRUE(1) if the open DS claims to support file transfer mode (XFERMECH_FILE)
// This mode is optional.  If TRUE, you can use AcquireFile.

int EZTAPI TWAIN_SetPaperSize(int nPaper);
// See TWSS_* in TWAIN.H
#define PAPER_A4LETTER    1
#define PAPER_B5LETTER    2
#define PAPER_USLETTER    3
#define PAPER_USLEGAL     4
#define PAPER_A5          5
#define PAPER_B4          6
#define PAPER_B6          7
#define PAPER_USLEDGER    9
#define PAPER_USEXECUTIVE 10
#define PAPER_A3          11
#define PAPER_B3          12
#define PAPER_A6          13
#define PAPER_C4          14
#define PAPER_C5          15
#define PAPER_C6          16

//-------- Document Feeder -------

BOOL EZTAPI TWAIN_HasFeeder(void);
// Return TRUE(1) if the source indicates it has a document feeder.
// Note: A FALSE(0) is returned if the source does not handle this inquiry.

BOOL EZTAPI TWAIN_IsFeederSelected(void);
// Return TRUE(1) if the document feeder is selected.

int EZTAPI TWAIN_SelectFeeder(int fYes);
// (Try to) select or deselect the document feeder.
// Return TRUE(1) if successful, FALSE(0) otherwise.

BOOL EZTAPI TWAIN_IsAutoFeedOn(void);
// Return TRUE(1) if automatic feeding is enabled, otherwise FALSE(0).
// Make sure the feeder is selected before calling this function.

int EZTAPI TWAIN_SetAutoFeed(int fYes);
// (Try to) turn on/off automatic feeding thru the feeder.
// Return TRUE(1) if successful, FALSE(0) otherwise.
// This function selects the feeder, so to start scanning
// pages from an ADF, just do: TWAIN_SetAutoFeed(TRUE).

BOOL EZTAPI TWAIN_IsFeederLoaded(void);
// Return TRUE(1) if there are documents in the feeder.
// Make sure the feeder is selected before calling this function.

//-------- Duplex Scanning -------

int EZTAPI TWAIN_GetDuplexSupport(void);
// Query the device for duplex scanning support.
//   Return values:
// 0    = no support (or error, or query not recognized)
// 1    = 1-pass duplex
// 2    = 2-pass duplex

int EZTAPI TWAIN_EnableDuplex(int fYes);
// Enable (fYes=1) or disable (fYes=0) duplex scanning.
// Returns TRUE(1) if successful, FALSE(0) otherwise.

BOOL EZTAPI TWAIN_IsDuplexEnabled(void);
// Returns TRUE(1) if the device supports duplex scanning
// and duplex scanning is enabled.  FALSE(0) otherwise.

//--------- Other 'exotic' capabilities --------

int EZTAPI TWAIN_HasControllableUI(void);
// Return 1 if source claims UI can be hidden (see SetHideUI above)
// Return 0 if source says UI *cannot* be hidden
// Return -1 if source (pre TWAIN 1.6) cannot answer the question.

int EZTAPI TWAIN_SetIndicators(BOOL bVisible);
// Tell the source to show (hide) progress indicators during acquisition.

int EZTAPI TWAIN_Compression(void);
int EZTAPI TWAIN_SetCompression(int compression);
// Set/Return compression style for transferred data

BOOL EZTAPI TWAIN_Tiled(void);
int EZTAPI TWAIN_SetTiled(BOOL bTiled);
// Set/Return whether source does memory xfer via strips or tiles.
// bTiled = TRUE if it uses tiles for transfer.

int EZTAPI TWAIN_PlanarChunky(void);
int EZTAPI TWAIN_SetPlanarChunky(int shape);
// Set/Return current pixel shape (TWPC_CHUNKY or TWPC_PLANAR), or -1.

#define CHUNKY_PIXELS    0
#define PLANAR_PIXELS    1

int EZTAPI TWAIN_PixelFlavor(void);
int EZTAPI TWAIN_SetPixelFlavor(int flavor);
// Set/Return pixel 'flavor' - whether 0 is black or white:

#define CHOCOLATE_PIXELS   0     // zero pixel represents darkest shade
#define VANILLA_PIXELS     1  // zero pixel represents lightest shade


int EZTAPI TWAIN_SetLightPath(BOOL bTransmissive);
// Tries to select transparent or reflective media on the open source.
// A parameter of TRUE(1) means transparent, FALSE(0) means reflective.
// A return of TRUE(1) implies success, FALSE(0) means that
// the data source refused the request.

int EZTAPI TWAIN_SetAutoBright(BOOL bOn);
int EZTAPI TWAIN_SetGamma(double dGamma);
int EZTAPI TWAIN_SetShadow(double d);       // 0..255
int EZTAPI TWAIN_SetHighlight(double d);    // 0..255

//--------- Image Layout (Region of Interest) --------

int EZTAPI TWAIN_SetImageLayout(double L, double T, double R, double B);
// Specify the area to scan, sometimes called the ROI (Region of Interest)
// This call is only valid in State 4.
// L, T, R, B = distance to left, top, right, and bottom edge of
// area to scan, measured in the current unit of measure,
// from the top-left corner of the 'original page' (TWAIN 1.6 8-22)

int EZTAPI TWAIN_GetImageLayout(double *L, double *T, double *R, double *B);
int EZTAPI TWAIN_GetDefaultImageLayout(double *L, double *T, double *R, double *B);
// Get the current or default (power-on) area to scan.
// This call is valid in States 4-6.
// 1 = success, 0 = failure.  Supposedly the returned values (see above)
// are in the current unit of measure (ICAP_UNITS), but I observe that
// many DS's ignore ICAP_UNITS when dealing with Image Layout.

int EZTAPI TWAIN_ResetImageLayout(void);
// Reset the area to scan to the default (power-on) settings.
// This call is only valid in State 4.
// 1 = success, 0 = failure.

//--------- Fun With Containers --------

// Capability values are passed thru the TWAIN API in blocks of
// global memory called 'containers'.  EZTWAIN represents these
// containers with a handle (an integer) called HCONTAINER.
// The following functions provide reasonably comprehensive access
// to the contents of containers.  See also TWAIN_Get, TWAIN_Set.
//
// There are four shapes of containers, which I call 'formats'.
// Depending on its format, a container holds some 'items' - these
// are simple data values, all the same type in a given container.

// Container formats, same codes as in TWAIN.H
#define CONTAINER_ARRAY           3
#define CONTAINER_ENUMERATION     4
#define CONTAINER_ONEVALUE        5
#define CONTAINER_RANGE           6

typedef DWORD HCONTAINER;
// If you are coding in VB or similar, this is a 32-bit integer.

void EZTAPI CONTAINER_Free(HCONTAINER hcon);
// Free the memory and resources of a capability container.

HCONTAINER EZTAPI CONTAINER_Copy(HCONTAINER hcon);
// Create an exact copy of the container.

int EZTAPI CONTAINER_Format(HCONTAINER hcon);
// Return the 'format' of this container: CONTAINER_ONEVALUE, etc.

int EZTAPI CONTAINER_ItemType(HCONTAINER hcon);
// Return the item type (what exact kind of values are in the container.)
// See the TWTY_* definitions in TWAIN.H

int EZTAPI CONTAINER_ItemCount(HCONTAINER hcon);
// Return the number of values in the container.
// For a ONEVALUE, return 1.

double EZTAPI CONTAINER_FloatValue(HCONTAINER hcon, int n);
int EZTAPI CONTAINER_IntValue(HCONTAINER hcon, int n);
// Return the value of the nth item in the container.
// n is forced into the range 0 to ItemCount(hcon)-1.

BYTE* EZTAPI CONTAINER_ValuePtr(HCONTAINER hcon, int n);

int EZTAPI CONTAINER_ContainsValue(HCONTAINER hcon, double d);
// Return 1 (TRUE) if the value d is one of the items in the container.
int EZTAPI CONTAINER_FindValue(HCONTAINER hcon, double d);
// Return the index of the value d in the container, or -1 if not found.

double EZTAPI CONTAINER_CurrentValue(HCONTAINER hcon);
double EZTAPI CONTAINER_DefaultValue(HCONTAINER hcon);
// Return the container's current or power-up (default) value.
// Array containers do not have these and will return -1.0.
// OneValue containers always return their (one) value.

int EZTAPI CONTAINER_DefaultIndex(HCONTAINER hcon);
int EZTAPI CONTAINER_CurrentIndex(HCONTAINER hcon);
// Return the index of the Default or Current value, in an Enumeration.
// Return -1 if the container is not an Enumeration.

double EZTAPI CONTAINER_MinValue(HCONTAINER hcon);
double EZTAPI CONTAINER_MaxValue(HCONTAINER hcon);
double EZTAPI CONTAINER_StepSize(HCONTAINER hcon);
// Return the three parameters that define a Range container.
// Returns -1.0 if the container is not a Range.

// The following four functions create containers from scratch:
// nItemType is one of the TWTY_* item types from TWAIN.H
// nItems is the number of items, in an array or enumeration.
// dMin, dMax, dStep are the beginning, ending, and step value of a range.
HCONTAINER EZTAPI CONTAINER_OneValue(int nItemType, double dVal);
HCONTAINER EZTAPI CONTAINER_Range(int nItemType, double dMin, double dMax, double dStep);
HCONTAINER EZTAPI CONTAINER_Array(int nItemType, int nItems);
HCONTAINER EZTAPI CONTAINER_Enumeration(int nItemType, int nItems);

int EZTAPI CONTAINER_SetItem(HCONTAINER hcon, int n, double dVal);
int EZTAPI CONTAINER_SetItemString(HCONTAINER hcon, int n, LPCTSTR pzVal);
int EZTAPI CONTAINER_SetItemFrame(HCONTAINER hcon, int n, double l, double t, double r, double b);
// Set the nth item of the container to dVal or pzText, or frame(l,t,r,b).
// NOTE: A OneValue is treated as an array with 1 element.
// Return 1 (TRUE) if successful. 0 (FALSE) for failure:
//    The container is not an array, enumeration, or onevalue
//    n < 0 or n >= CONTAINER_ItemCount(hcon)
//    the value cannot be represented in this container's ItemType.

int EZTAPI CONTAINER_SelectDefaultValue(HCONTAINER hcon, double dVal);
int EZTAPI CONTAINER_SelectDefaultItem(HCONTAINER hcon, int n);
int EZTAPI CONTAINER_SelectCurrentValue(HCONTAINER hcon, double dVal);
int EZTAPI CONTAINER_SelectCurrentItem(HCONTAINER hcon, int n);
// Select the current or default value within an enumeration or range,
// by specifying either the value, or its index.
// Returns 1 (TRUE) if successful, 0 (FALSE) otherwise.
// This will fail if:
//    The container is not an enumeration or range.
//    dVal is not one of the values in the container
//    n < 0 or n >= CONTAINER_ItemCount(hcon)

int EZTAPI CONTAINER_DeleteItem(HCONTAINER hcon, int n);
// Delete the nth item from an Array or Enumeration container.
// Returns 1 (TRUE) for success, 0 (FALSE) otherwise. Failure causes:
//   invalid container handle
//   container is not an array or enumeration
//   n < 0 or n >= ItemCount(hcon)

int EZTAPI CONTAINER_InsertItem(HCONTAINER hcon, int n, double dVal);
// Insert an item with value dVal into the container at position n.
// If n = -1, the item is inserted at the end of the container.

//--------- Low-level Capability Negotiation Functions --------
// Setting a capability is valid only in State 4 (TWAIN_SOURCE_OPEN)
// Getting a capability is valid in State 4 or any higher state.

HCONTAINER EZTAPI TWAIN_Get(unsigned uCap);
// Issue a DAT_CAPABILITY/MSG_GET to the open source.
// Return a capability 'container' - the 'MSG_GET' value of the capability.
// Use CONTAINER_* functions to examine and modify the container object.
// Use CONTAINER_Free to release it when you are done with it.
// A return value of 0 indicates failure:  Call GetConditionCode
// or ReportLastError above.

HCONTAINER EZTAPI TWAIN_GetDefault(unsigned uCap);
HCONTAINER EZTAPI TWAIN_GetCurrent(unsigned uCap);
// Issue a DAT_CAPABILITY/MSG_GETDEFAULT or MSG_GETCURRENT.  See Get above.

int EZTAPI TWAIN_Set(unsigned uCap, HCONTAINER hcon);
// Issue a DAT_CAPABILITY/MSG_SET to the open source,
// using the specified capability and container.
// Return value as for TWAIN_DS

int EZTAPI TWAIN_Reset(unsigned uCap);
// Issue a MSG_RESET on the specified capability.
// State must be 4.  Returns 1 (TRUE) if successful, 0 (FALSE) otherwise.

BOOL EZTAPI TWAIN_GetCapBool(unsigned cap, BOOL bDefault);
// Issue a DAT_CAPABILITY/MSG_GETCURRENT on the specified capability,
// assuming the value type is TW_BOOL.
// If successful, return the returned value.  Otherwise return bDefault.
// This is only valid in State 4 (TWAIN_SOURCE_OPEN) or higher.

double EZTAPI TWAIN_GetCapFix32(unsigned cap, double dDefault);
int EZTAPI TWAIN_GetCapUint16(unsigned cap, int nDefault);

int EZTAPI TWAIN_SetCapFix32(unsigned Cap, double dVal);
int EZTAPI TWAIN_SetCapOneValue(unsigned Cap,
                                unsigned ItemType,
                                long ItemVal);
// Do a DAT_CAPABILITY/MSG_SET, on capability 'Cap' (e.g. ICAP_PIXELTYPE,
// CAP_AUTOFEED, etc.) using a TW_ONEVALUE container with the given item type
// and value.  Use SetCapFix32 for capabilities that take a FIX32 value,
// use SetCapOneValue for the various ints and uints.  These functions
// do not support FRAME or STR items.
// Return Value: TRUE (1) if successful, FALSE (0) otherwise.
int EZTAPI TWAIN_SetCapFix32R(unsigned Cap, int Numerator, int Denominator);
// Just like TWAIN_SetCapFix32, but uses the value Numerator/Denominator
// This is useful for languages that make it hard to pass double parameters.

int EZTAPI TWAIN_GetCapCurrent(unsigned Cap,
                               unsigned ItemType,
                               void FAR *pVal);
// Do a DAT_CAPABILITY/MSG_GETCURRENT on capability 'Cap'.
// Copy the current value out of the returned container into *pVal.
// If the operation fails (the source refuses the request), or if the
// container is not a ONEVALUE or ENUMERATION, or if the item type of the
// returned container is incompatible with the expected TWTY_ type in nType,
// returns FALSE.  If this function returns FALSE, *pVal is not touched.

long EZTAPI TWAIN_ToFix32(double d);
// Convert a floating-point value to a 32-bit TW_FIX32 value that can be passed
// to e.g. TWAIN_SetCapOneValue
long EZTAPI TWAIN_ToFix32R(int Numerator, int Denominator);
// Convert a rational number to a 32-bit TW_FIX32 value.
// Returns a TW_FIX32 value that approximates Numerator/Denominator

double EZTAPI TWAIN_Fix32ToFloat(long nfix);
// Convert a TW_FIX32 value (as returned from some capability inquiries)
// to a double (floating point) value.

//--------- Lowest-level functions for TWAIN protocol --------


int EZTAPI TWAIN_DS(unsigned long DG, unsigned DAT, unsigned MSG, void FAR *pData);
// Pass the triplet (DG, DAT, MSG, pData) to the open data source if any.
// Returns 1 (TRUE) if the result code is TWRC_SUCCESS, 0 (FALSE) otherwise.
// The last result code can be retrieved with TWAIN_GetResultCode(), and the
// corresponding condition code can be retrieved with TWAIN_GetConditionCode().
// If no source is open this call will fail, result code TWRC_FAILURE,
// condition code TWCC_NODS.

int EZTAPI TWAIN_Mgr(unsigned long DG, unsigned DAT, unsigned MSG, void FAR *pData);
// Pass a triplet to the Data Source Manager (DSM).
// Returns 1 (TRUE) for success, 0 (FALSE) otherwise.
// See GetResultCode, GetConditionCode, and ReportLastError functions
// for diagnosing and reporting a TWAIN_Mgr failure.
// If the Source Manager is not open, this call fails setting result code
// TWRC_FAILURE, and condition code=TWCC_SEQERROR (triplet out of sequence).


//--------- Dosadi Special --------

char* EZTAPI TWAIN_BuildName(void);
// Return a string describing the build of EZTWAIN e.g. "Beta1 Debug"

void EZTAPI TWAIN_GetBuildName(LPSTR psName);

int EZTAPI TWAIN_GetSourceIdentity(LPVOID ptwid);

void EZTAPI TWAIN_LogFile(int fLog);
// Turn logging to c:\eztwain.log on or off.
// fLog = 0    close log file and turn off logging
// fLog != 0   open log file (if not already) and start logging

int EZTAPI TWAIN_SelfTest(unsigned f);
// Perform internal self-test.
//   f      ignored for now
// Return value:
//   0      success
//   other  internal test failed.

// For use only by direct-linked applications:
int EZTWAIN_Attach();
int EZTWAIN_Detach();

#ifdef __cplusplus
}
#endif

#endif

// History: See end of file eztwain.c


 
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sun Apr 08, 2012 3:50 pm

Aqui en este link esta la dll EZTW32.DLL

http://190.90.160.205/pruebas/EZTW32.zip

Slds
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby Antonio Linares » Sun Apr 08, 2012 8:03 pm

Prueba asi:

extern "C" {
#include "eztwain.h"
};
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41328
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sun Apr 08, 2012 9:53 pm

Antonio,

Al colocar la instrucion y compilar sale los siguientes mensajes de error y warning solo coloque los primeros mensajes:

Code: Select all  Expand view


C:\fuentes\Librerias\recurlib\Source\TSCAN.000(289) : error C2059: error de sintaxis : 'cadena' //Aqui es donde coloco el extern ....
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(299) : warning C4013: 'TWAIN_Acquire' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(304) : warning C4013: 'TWAIN_FreeNative' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(310) : warning C4013: 'TWAIN_SelectImageSource' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(315) : warning C4013: 'TWAIN_AcquireNative' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(320) : warning C4013: 'TWAIN_AcquireToClipboard' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(325) : warning C4013: 'TWAIN_AcquireMemory' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(330) : warning C4013: 'TWAIN_AcquireToFilename' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(335) : warning C4013: 'TWAIN_AcquireFile' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(342) : warning C4013: 'TWAIN_IsAvailable' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(347) : warning C4013: 'TWAIN_EasyVersion' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(352) : warning C4013: 'TWAIN_State' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(357) : warning C4013: 'TWAIN_SourceName' sin definir; se supone que extern devuelve como resultado int
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(357) : warning C4047: 'función' : 'const char *' es distinto en los niveles de direccionamiento indirecto de 'int'
C:\fuentes\Librerias\recurlib\Source\TSCAN.000(357) : warning C4024: 'hb_retc' : tipos distintos para el parámetro formal y el parámetro real 1

 
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Compilando TSCAN MVC2010

Postby nnicanor » Sun Apr 08, 2012 9:55 pm

Si le agrego el parametro /TP la compilar deja de salir el error del extern pero salen los mismos simbolos no resueltos anteriores.

Slds
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 295
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Next

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 11 guests