|
Storing arrays in HF binary fields |
Débuté par Jeff Graham, 10 nov. 2011 08:01 - 5 réponses |
| |
| | | |
|
| |
Posté le 10 novembre 2011 - 08:01 |
Greetings, I am trying to store a large byte array (13k or more) in a HF binary memo field. Since this data is only in memory, I can't use HLinkMemo. I have tried various methods all to no avail. I get exceptions on all the methods I have tried. I have tried with the Features field as "Other binary memo", "OLE (binary memo)" and with "Binary string". I am running out of ideas. What am I missing? Jeff My code attempts
aTest is array of bytes = [1,2,3,4,5,6,7,8,9,10,11,12] aReturn is array of 20 bytes bufFeatures is Buffer HReset(Fingerprints) Fingerprints.AccountsID = 99999
Serialize(aTest,bufFeatures,psdBinary) Fingerprints.Features = bufFeatures HAdd(Fingerprints) iNewID is int = Fingerprints.ID HReadSeek(Fingerprints,ID,iNewID) IF HFound(Fingerprints) THEN
Deserialize(aReturn,Fingerprints.Features,psdBinary) Info("aReturn size ="+ArrayInfo(aReturn,tiTotalSize),"byte 12:"+aReturn[12],"Array: "+ArrayToString(aReturn)) END |
| |
| |
| | | |
|
| | |
| |
Posté le 10 novembre 2011 - 08:02 |
Hi. So you want to save a fingerprint right? What SDK are you using? In my case, I use the Serialize() function with a string var, not a buffer var. As I already have a record for that fingerprint, I use:
mytable.fingerprint= sFingerprint HModify(mytable)
Regards. |
| |
| |
| | | |
|
| | |
| |
Posté le 10 novembre 2011 - 08:02 |
Hi Raul, I am using VeriFinger 6.3 SDK. They store their templates in a byte[] for C#. I changed the buffers to strings and it worked. But I also went back and changed the code to Deserialize from a buffer instead of the field itself. That also works. Thanks, Jeff For those interested:
aTest is array of bytes = [1,2,3,4,5,6,7,8,9,10,11,12] aReturn is array of 20 bytes bufFeatures is Buffer sFeatures is string HReset(Fingerprints) Fingerprints.AccountsID = 99999 Serialize(aTest,bufFeatures,psdBinary) Fingerprints.Features = bufFeatures
HAdd(Fingerprints) iNewID is int = Fingerprints.ID HReadSeek(Fingerprints,ID,iNewID) IF HFound(Fingerprints) THEN bufFeatures = Fingerprints.Features Deserialize(aReturn,bufFeatures,psdBinary)
Info("aReturn size ="+ArrayInfo(aReturn,tiTotalSize),"byte 12:"+aReturn[12],"Array: "+ArrayToString(aReturn)) END |
| |
| |
| | | |
|
| | |
| |
Posté le 10 novembre 2011 - 08:02 |
Good! That issue took me a week to solve once. Regards. |
| |
| |
| | | |
|
| | |
| |
Posté le 01 août 2013 - 23:11 |
MyBuffer is Buffer = fLoadBuffer("MyFile.bin")
// Now you can slice the buffer f.i.
slice is Buffer = MyBuffer [[1 TO 8]] // read the first 8 byte
// OR ...if you prefer an byte array
n is int = Length(MyBuffer)
fileArr is array of n Byte
FOR i = 1 TO n
fileArr[ i ] = MyBuffer[[ i ]]
END |
| |
| |
| | | |
|
| | |
| |
Membre enregistré 10 messages |
|
Posté le 01 mars 2019 - 13:55 |
Hello , I did follow with agreat interest code you published on Verifinger 6.3 SDK on November 2011. I'm facing now similar challenge. Which consists to perform enrollment and verification on a custom application. Developing under Windev 24, I would like to use columbo FingerPrint Reader and VeriFinger 11.0 SDK into my custom application. Based on nice experience, I will appreciate to learn more ...( improved code, item imported into your project, how you processed, the your database format, know if you have improved code on enrollment and verification). With Regards, DIARRAMessage modifié, 01 mars 2019 - 13:58 |
| |
| |
| | | |
|
| | | | |
| | |
|