DigitalPersona FingerPrint SDK

HI, i have the DigitalPersona FingerPrint SDK. In Visual Basic it work fine. In Xojo its work but i can’t serialize and deserialize the fingerprint template with the method include in the SDK for save to a file or Database. I need to translate the following working code from Visual Basic to Xojo. Please Help!!!

For serialize the Templae in VB this work:

Dim str As New MemoryStream
Dim serializedTemplate As Byte() = str.ToArray()
SQL.Parameters.AddWithValue(“biometricData”, serializedTemplate)

For deserialize:

Dim rsBioData As SqlDataReader = SQL.ExecuteReader
Dim byteTemplate As Byte
Dim memStreamTemplate As MemoryStream
If rsBioData.HasRows Then
While rsBioData.Read
byteTemplate = rsBioData(“BiometricData”)
memStreamTemplate = New MemoryStream(byteTemplate)
Me.Template = DirectCast(template.DeSerialize(memStreamTemplate), DPFP.Template)
End While
End If

I try the following in XOJO for serialize
Function TemplateToString(templateObject as DPFPShrXLib.DPFPTemplate) as String
Dim data as String
Dim templateData() as object= templateObject.Serialize
for each character as object in templateData
data = data + str(character)
return EncodeBase64(data)
END Funtion

For deserialize i try this:
Function StringToTemplate(data As String) As DPFPShrXLib.DPFPTemplate
Dim decodedData as String = DecodeBase64(data)
Dim mb as MemoryBlock = decodedData
Dim templateData() as byte
Dim templateObject As new DPFPShrXLib.DPFPTemplate
Dim i as integer
while i < mb.Size
i = i + 1
return templateObject
END Fucntion

Any help please with code example

good day, had you finish the code in xojo with biometrics?

Hi. NO. we finish the project in other language.