Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to save VARIANT datatype from Fingerprint scanner
Message
From
27/12/2007 10:28:28
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
01276941
Message ID:
01277784
Views:
15
Fred,

>No indication or possibly some other property you have to set that says what the size of the return value buffer is? That's a pretty common way that's used to pass a buffer.

>Is anything being returned in AERROR()? What are you getting back for lnResult?

I am pretty sure there is no property that shows the size of the return value. I may have missed it, so, below is the documentation of that object, FPTEMPLATE. As for lnResult, I get back a value of Zero, which is the success value.
FPTemplate
A COM component containing a fingerprint template. The object is
characterized by its type, either a preregistration, registration or verification
template.

Interface
IFPTemplate

Methods

Export([out] VARIANT* pVal, [out,retval] AIErrors *pErr)
Exports the template object as a signed blob of bytes.

Import([in] VARIANT Val)
Evaluates the signature of a blob of bytes representing the signed template
object and, if verified, imports the data into the FPTemplate object.

Properties

InstanceID([out,retval] BSTR* pVal)
Returns the GUID of the object in string format (read-only).

Version([out,retval] BSTR* pVal)
Returns the version number of the object (read-only).

TypeID([out,retval] AIDataTypes* pVal)
Returns the type of the object, Dt_Template (read-only).

CredType([out,retval] AICredentials* pVal)
Returns the type of credential this object refers to, Cr_Fingerprint (read-only).

VendorID([out,retval] BSTR* pVal)
Returns the GUID for the vendor in string format (read-only).

SecureMode([out, retval] AISecureModeMask *pVal)
Returns the security mode of the object (read-only). See
“AISecureModeMask” on page 111 for possible values.

Nonce([out, retval] VARIANT *pVal)
Returns the nonce contained in the object. If no nonce is present, an empty
variant is returned (read-only).

TemplType([out,retval] AITemplateTypes* pVal)
Returns the type of the template (read-only).

TemplData([out,retval] VARIANT *pVal)
Returns the raw template data, without the header and signature (read-only).

Event interface
None

Event methods
None

Return codes
Er_OK is returned if successful.  (Er_OK is 0 in value)
Er_InvalidArg is returned by:
• Import method when the input parameter is not validExport method when the parameter is not valid
Er_BadSignature is returned by:
• Import method when the signature is not verified
Er_AlreadyCreated is returned by:
• Import method when the object is not empty but already contains data
<PRE>

>
>
>>Fred,
>>
>>I even tried initializing the variable lblobFingerPrint to SPACE(4096) - to no avail.  The ptemplate object does not have a property that shows how big the "fingerprint data" is.
>>
>>Thanks.
>>
>>Dennis
>>
>>
>>
>>>>Borislav,
>>>>
>>>>I believe the problem lies in this particular line
>>>>
>>>><pre>
>>>>lnResult = ptemplate.Export( @lblobFingerPrnt )
>>>>
>>>>
>>>>The variable lblobFingerPrnt just doesn't get the value returned!
>>>>In the documentation, the Export method returns a "BYTE ARRAY".. how do we do that in VFP?
>>>>
>>>>Thanks
>>>>
>>>>Dennis
>>>>
>>>
>>>lblobFingerPrnt must be initialized large enough to hold all the data that could be returned. Try setting it's value to SPACE(2000) or something like that, depending on how big the data returned might be.
>>>
>>>>
>>>>
>>>>LOCAL lblobFingerPrnt, lnResult
>>>>
>>>>SET ASSERTS ON
>>>>WAIT WINDOW NOWAIT "Creating Employee Record..." NOCLEAR
>>>>
>>>>lblobFingerPrnt = []
>>>>lnResult        = ptemplate.Export( @lblobFingerPrnt )
>>>>
>>>>ASSERT NOT EMPTY(lblobFingerPrnt)
>>>>IF lnResult # Er_OK
>>>>   MESSAGEBOX( "Error in getting Registration Template" )
>>>>   RETURN
>>>>ENDIF
>>>>
>>>>APPEND BLANK IN employee
>>>>replace lastname   WITH thisform.txtLastname.Value,;
>>>>        firstname  WITH thisform.txtFirstname.Value,;
>>>>        fingerprnt WITH lblobFingerPrnt IN employee
>>>>
>>>>WAIT CLEAR
>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform