No, with Digital Persona I had no success.
We buy another reader (Hamster DX) and everything is fine now.
#include "FiveWin.ch"
function Start()
local oWnd, oBar,oMenu,oBtn
DEFINE WINDOW oWnd MENU oMenu
DEFINE BUTTONBAR oBar OF oWnd 2010
@ 2,2 BUTTON oBtn PROMPT "Read" OF oWnd SIZE 40,20 ACTION Ler() UPDATE
@ 4,2 BUTTON oBtn PROMPT "Verify" OF oWnd SIZE 40,20 ACTION Ver() UPDATE
ACTIVATE WINDOW oWnd CENTERED
return nil
FUNCTION Ler()
LOCAl cDedo,cFname,nH,_BT
cDedo := Hamster_PegaDedo()
// Save cDedo in da folder
cFname := GetCurDir()+"\D1.TXT"
nH := FCreate(cFname)
_nBt := FWrite(nH, cDedo)
FClose(nH)
RETURN nil
*...*
// Gets the digital
FUNCTION Hamster_PegaDedo()
LOCAL objNBioBSP,objDevice,objExtraction,objMatching,digital
objNBioBSP := CreateObject('NBioBSPCOM.NBioBSP')
objDevice := objNBioBSP:Device
objExtraction := objNBioBSP:Extraction
objMatching := objNBioBSP:Matching
objExtraction:WindowStyle := 0
objDevice:Open(255)
objExtraction:DefaultTimeout := 5000
objExtraction:Capture()
digital:= objExtraction:TextEncodeFIR()
objDevice:Close(255)
RETURN( digital )
// The function bellow is an example of how to teste the digital
FUNCTION Ver()
local aFiles
//IF cFReader != "Fingkey Hamster - Nitgen"
// MsgAlert("Configure a biometria no menu 'Configurações' -> 'Gerais'","Erro de configuração")
// RETURN " "
//ENDIF
objNBioBSP := CreateObject('NBioBSPCOM.NBioBSP')
objDevice := objNBioBSP:Device
objExtraction := objNBioBSP:Extraction
objMatching := objNBioBSP:Matching
objExtraction:WindowStyle := 0;
objDevice:Open(255)
objExtraction:DefaultTimeout := SECS("02:00:00") * 1000 // Duas horas convertidas para milliseconds
objExtraction:Capture()
cTempl := objExtraction:TextEncodeFIR()
cDedo := ""
aFiles := Directory( GetCurDir()+"\D*.TXT" )
IF LEN(aFiles) > 0
FOR nDedo := 1 TO LEN(aFiles)
cTxtFile := GetCurDir()+"\"+aFiles[nDedo,1]
objMatching:VerifyMatch(cTempl, MEMOREAD(cTxtFile))
if objMatching:ErrorCode <> 0
*msginfo("error")
else
if objMatching:MatchingResult = 1
cDedo := aFiles[nDedo,1]
EXIT
endif
endif
NEXT
ENDIF
cCodigo := "0"
IF .NOT. EMPTY(cDedo)
? "Found",cDedo
ELSE
cCodigo := " "
ENDIF
objDevice:Close(255)
RETURN( cCodigo )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 63 guests