ByteArray to NFRecod

General information about Neurotechnology and its software

ByteArray to NFRecod

Postby iamreadytosurf » Jan 19, 2010 01:00

Hi,

I working on VeriFinger 5 SDK, manage to save NFRecord to Byte Arrays
ByteArray1 = NFRecord1.Save

I have mange to bring bytes back in to the program using following

Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then

            Dim fInfo As New FileInfo(OpenFileDialog1.FileName)

            Dim numBytes As Long = fInfo.Length

            Dim fStream As New FileStream(OpenFileDialog1.FileName, FileMode.Open, FileAccess.Read)

            Dim br As New BinaryReader(fStream)

            Dim ByteArray1 As Byte() = br.ReadBytes(CInt(numBytes))

            br.Close()

            fStream.Close()

        End If
    End Sub
End Class


But can not find a way to convert bytes back to NFRecord. Any help pls :roll:
iamreadytosurf
 
Posts: 6
Joined: Jan 18, 2010 19:27

Re: ByteArray to NFRecod

Postby Povilas » Jan 20, 2010 14:42

Hello,

Use NFRecord(IntPtr, int) constructor to create NFRecord object from record in memory.
Povilas
Neurotechnology
 
Posts: 25
Joined: Aug 13, 2009 14:17

Re: ByteArray to NFRecod

Postby iamreadytosurf » Feb 08, 2010 12:59

Thank you

I been trying for few weeks but i still cant get NFRecord back.

NFRecord(IntPtr, int)

Just try to work out what are the IntPtr and int values and how do i import them in to my code.
iamreadytosurf
 
Posts: 6
Joined: Jan 18, 2010 19:27

Re: ByteArray to NFRecod

Postby Martynas » Feb 09, 2010 11:03

Hello,

as I see you are using VB.Net. Below you will find a code how to read the saved NFRecord.

Code: Select all
Dim fileData() As Byte = File.ReadAllBytes("saved_nfrecord")
Dim nfRecord As NFRecord = New NFRecord(fileData)
Best regards,

Martynas
Software Consultant
Neurotechnology
Martynas
Neurotechnology
 
Posts: 2234
Joined: Sep 19, 2008 10:02
Location: Vilnius, Lithuania

Re: ByteArray to NFRecod

Postby iamreadytosurf » Feb 13, 2010 14:48

Martynas wrote:Hello,

as I see you are using VB.Net. Below you will find a code how to read the saved NFRecord.

Code: Select all
Dim fileData() As Byte = File.ReadAllBytes("saved_nfrecord")
Dim nfRecord As NFRecord = New NFRecord(fileData)



Thanks a lot :D
iamreadytosurf
 
Posts: 6
Joined: Jan 18, 2010 19:27


Return to Public

Who is online

Users browsing this forum: No registered users and 5 guests