Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to save VARIANT datatype from Fingerprint scanner
Message
 
À
31/12/2007 23:58:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
01276941
Message ID:
01278902
Vues:
22
>Gary,
>
>>Perhaps the method wants a safearray of bytes (VT_UI1) passed by_ref
>>
>>DIMENSION lblobFingerPrnt[1000] as BYTE && The server should be able to re-dimension
>>COMARRAY(ptemplate,10) && Look at COMARRAY for other values
>>
>>lnResult = ptemplate.Export( @lblobFingerPrnt )
>>
>
>This is what I did:
>
>
>*** ActiveX Control Event ***
>LPARAMETERS ptemplate
>
>LOCAL lblobFingerPrint, lnResult, laFinger[1]
>
>WAIT WINDOW NOWAIT "Creating Employee Record..." NOCLEAR
>
>DIMENSION laFinger[1024] AS Byte
>COMARRAY( ptemplate, 11 )
>
>lnResult = ptemplate.Export( @laFinger )
>
>IF lnResult # Er_OK
>   MESSAGEBOX( "Error in getting Registration Template" )
>   RETURN
>ENDIF
>
>lblobFingerPrint = 0h
>FOR i = 1 TO ALEN( laFinger, 1 )
>    WAIT WINDOW NOWAIT i    && just for me to know it is working
>    lblobFingerPrint = lblobFingerPrint + laFinger[i]
>ENDFOR
>
>APPEND BLANK IN employee
>replace lastname   WITH thisform.txtLastname.Value,;
>        firstname  WITH thisform.txtFirstname.Value,;
>        fingerprnt WITH lblobFingerPrint IN employee
>
>WAIT CLEAR
>
>
>The following are my observations:
>
>1. The resulting size of lblobFingerPrint is ALWAYS equal to the length of the array multiplied by 1024. So, if I dimension the array laFinger to laFinger[12], it will get 12 x 1024.
>
>2. This means the ActiveX does not re-dimension the array.
>
>3. If I open the field FingerPrnt, it shows a big bunch of zeroes. How do you make of that?
>
>4. Using COMARRAY with an argument of 10 will cause laFinger array values to be 'numeric zeroes'.
>
>Thanks for helping!
>
>Dennis


How about to make this array PUBLIC not LOCAL?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform