Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to save VARIANT datatype from Fingerprint scanner
Message
De
24/12/2007 12:03:32
 
 
À
24/12/2007 04:29:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
01276941
Message ID:
01277367
Vues:
17
Viv,

lnResult returns 0 which is "go ahead" or "ok" value. Nothing trapped in AERROR() either.

Dennis


>Hi,
>
>So what's the value of lnResult? Anything useful in AERROR()?
>Regards,
>Viv
>
>>>Have you looked at COMARRAY()?
>>
>>Yup, I did too... to no avail...
>>
>>I just can't 'get' or capture the returned value from the Export method of the object PTEMPLATE.
>>
>>In the Digital Persona documentation, the Export method is supposed to return a "blob of byte array"...
>>
>>Below, is the latest code I have:
>>
>>
>>*** ActiveX Control Event ***
>>LPARAMETERS ptemplate
>>
>>LOCAL lbFingerPrnt, lnResult, laFingerPrint
>>
>>WAIT WINDOW NOWAIT "Creating Employee Record..." NOCLEAR
>>
>>COMARRAY( ptemplate, 10+1000 )   && I tried diff parameter combinations here
>>
>>laFingerPrint = ""               && also used CREATEBINARY( " " )... to no avail either
>>
>>lnResult = ptemplate.Export( @laFingerPrint )
>>
>>IF lnResult # Er_OK
>>   MESSAGEBOX( "Error in getting Registration Template" )
>>   RETURN
>>ENDIF
>>
>>IF EMPTY( laFingerPrint )
>>   MESSAGEBOX( "Empty FINGERPRNT blob value!" )
>>   RETURN
>>ELSE
>>   MESSAGEBOX( "Hurray! FINGERPRNT blob value detected!" )
>>ENDIF
>>
>>APPEND BLANK IN employee
>>REPLACE employee.lastname WITH thisform.txtLastname.Value,;
>>        employee.firstname WITH thisform.txtFirstname.Value,;
>>        employee.fingerprnt WITH laFingerPrint
>>
>>WAIT CLEAR
>>
>>
>>
>>Thanks for any help...
>>
>>Happy Holidays!
>>
>>Dennis
>>
>>
>>
>>>Hi,
>>>
>>>Have you looked at COMARRAY()?
>>>>Hi Everybody,
>>>>
>>>>I am tinkering with a fingerprint scanner ActiveX control (Digital Persona).
>>>>
>>>>Instantiating, dropping and working with it seems to go on smoothly... till the last event called Done(), where it passes a "Fingerprint Template - FPTemplate" object variable.
>>>>
>>>>This is the code I created in the ActiveX control's Done() event:
>>>>
>>>>
>>>>*** ActiveX Control Event ***
>>>>LPARAMETERS ptemplate
>>>>
>>>>LOCAL lblobFingerPrnt, lnResult
>>>>
>>>>WAIT WINDOW NOWAIT "Creating Employee Record..." NOCLEAR
>>
>>>>
>>>>lnResult = ptemplate.Export( @lblobFingerPrnt )
>>>>
>>>>IF lnResult # Er_OK
>>>>   MESSAGEBOX( "Error in getting Registration Template" )
>>>>   RETURN
>>>>ENDIF
>>>>
>>>>APPEND BLANK IN employee
>>>>replace employee.lastname WITH thisform.txtLastname.Value,;
>>>>        employee.firstname WITH thisform.txtFirstname.Value,;
>>>>        employee.fingerprnt WITH lblobFingerPrnt
>>>>
>>>>WAIT CLEAR
>>>>
>>>>
>>>>I get "Data type mismatch" using the above. Going thru the Debugger, the value of variable lblobFingerPrnt is always .F. and is never updated even when invoking the Export method.
>>>>
>>>>This 'ptemplate' object variable, as per it's documentation, has an Export method, like so:
>>>>
>>>>
>>>>Export([out] VARIANT* pVal, [out,retval] AIErrors *pErr)
>>>>
>>>>* Exports the template object as a signed blob of bytes.
>>>>* This may then be saved by the developer in the database of his choice.
>>>>
>>>>
>>>>HELP! Obviously it has something to do with a VARIANT data type. Furthermore, the employee.fingerprnt field is of Blob type. Could this be wrong?
>>>>
>>>>Thanks in advance!
>>>>
>>>>Happy Holidays! Cheers!
>>>>
>>>>Dennis
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform