Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to save VARIANT datatype from Fingerprint scanner
Message
From
02/01/2008 09:52:59
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
 
 
To
31/12/2007 23:58:06
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
01276941
Message ID:
01278949
Views:
24
Hi Dennis,
I'm a little confused by observation 1. Is the size of the array different after the method call? That would seem to indicate a re-dimensioning by the activex component.

I don't have much in the way of more ideas, perhaps loading the array with 0's or chr(0)'s before sending. Have you examined the ActiveX control with the object browser to see if that reveals anything useful? I've dragged an interface on to an open prg or even the command window to see what a method wants and returns.

Good luck.

Gary

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform