Greetings to all...
I have reduced the fingerprint code to the following piece of code, that does all the needed stuff.
Just have one caveat... I'm transformiing this to a class that will be callled from .net as 4gl code aswell, but now i'm in the last step, want to pop out the value I got from scanner to be managed out side of the scanner realm...
METHOD PRIVATE VOID btnStart_Click( INPUT sender AS System.Object, INPUT e AS System.EventArgs ):
DEFINE VARIABLE ufs_res AS UFS_STATUS NO-UNDO.
DEFINE VARIABLE Scanner AS UFScanner NO-UNDO.
DEFINE VARIABLE EnrollQuality AS INTEGER NO-UNDO.
//ufs_res = scannerManager:Init() . it was initie'd in other place.
Scanner = scannerManager:Scanners[0].
IF Scanner <> ? THEN
DO:
ASSIGN
Scanner:nTemplateType = 2003.
Scanner:ClearCaptureImageBuffer().
ufs_res = Scanner:CaptureSingleImage().
IF STRING(ufs_res) <> STRING(UFS_STATUS:OK) THEN
DO:
ASSIGN
Resultado = "No se pudo leer ".
ufs_res = scannerManager:Uninit() .
RETURN.
END.
Template = NEW "System.Byte[]" (max_template_size).
ufs_res = Scanner:Extract(Template,TemplateSize, EnrollQuality).
IF STRING(UFS_STATUS:OK) <> "OK" THEN
ASSIGN
resultado = "Lectura incorrecta".
IF EnrollQuality < 40 THEN
ASSIGN
resultado = "Repita la lectura de la huella".
END.
ELSE
ASSIGN
resultado = msgError(ufs_res:value__).
MESSAGE STRING(template)
VIEW-AS ALERT-BOX.
ufs_res = scannerManager:Uninit() .
RETURN.
END METHOD.
My problem is the:
MESSAGE STRING(template)
VIEW-AS ALERT-BOX.
I put that to see what type of data is sending the scanner, so I can handle properly, and do the matching of persons on my payroll database... How could it be transformd to a native datatype?
My intention is to eliminate all visual of this class... and pop the identifier of the person out, so wil be handled outside the class...
Thanks a ton!!!!
As allways, deep insight....