by byron.hopp » Thu Jun 28, 2012 10:22 pm
I have downloaded that EzTw32.dll, which version of TScan.prg should I be using. My version utilized a Lib file as well EzTwain3.lib which is linked in with xharbour.
I must have some different version. I would much rather use your way. Can you send me the TScan.prg, are there any methods in my code that you do not recognize (oTwain) ?
Thanks,
Here is my spaghetti code...
Function ScanArDoc( oBrowse,nAr_SeqNo )
Local cFile := DtoS( ArRcv->Dep_Date ) + "_" + DtoS( ArRcv->Doc_Date ) + "_" + AllTrim( ArRcv->Company ) + "_" + AmountInFIle( ArRcv->Amount ) + "_" + PadL( ArRcv->AR_SeqNo,5,"0" ) + ".Bmp"
Local oTwain := nil
Local cFileName := SetUpArDirectories( cFile )
If MsgYesNo( "Load Scanner with document.","Yes to continue...")
CursorWait()
SysRefresh()
oTwain := TScan32():New( cFileName )
oTwain:SetRes( 100 ) // 100 Dpi
oTwain:SetHide( .t. ) // Show UI
oTwain:DigiToFile()
oTwain:End()
ArRcv->(RecLock())
ArRcv->Doc_Name := cFile
ArRcv->(DbCommit())
ArRcv->(DbUnlock())
oBrowse:Refresh()
CursorArrow()
SysRefresh()
Endif
Return nil
Thanks,
Byron Hopp
Matrix Computer Services