Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Fingerprint Biometric vb6 code conversion to PB

669 views
Skip to first unread message

opel

unread,
Dec 27, 2011, 4:18:33 PM12/27/11
to
Hello All,

Am currently using a U.are U. 4500 biometric reader for a project but
have issues with the code written in VB6 sdk. I need someone that can
help converting the code to Powerbuilder, especially the template
declaration and the handle

' Raw image data type.
Public Type rawImage
' Image data.
img As Variant
' Image width.
width As Long
' Image height.
height As Long
' Image resolution.
res As Long
End Type

' Template data Type
Public Type TTemplate
' Template data
tpt() As Byte
' Template size
Size As Long
End Type



' An image was acquired from reader
Private Sub GrFingerXCtrl1_ImageAcquired(ByVal idSensor As String,
ByVal width As Long, ByVal height As Long, rawImage As Variant, ByVal
res As Long)
' Copying aquired image
With raw
.img = rawImage
.height = height
.width = width
.res = res
End With

' Signaling that an Image Event occurred.
writeLog ("Sensor: " & idSensor & ". Event: Image captured.")

' display fingerprint image
Call PrintBiometricDisplay(False, GR_DEFAULT_CONTEXT)


End Sub



' Display fingerprint image on screen
Public Sub PrintBiometricDisplay(ByVal biometricDisplay As Boolean,
ByVal context As Integer)
' handle to finger image
Dim handle As IPictureDisp
' return value
Dim ret As Integer

If biometricDisplay Then
' get image with biometric info
formMain.GrFingerXCtrl1.biometricDisplay template.tpt,
raw.img, raw.width, raw.height, raw.res, formMain.hDC, handle, context
Else
' get raw image
formMain.GrFingerXCtrl1.CapRawImageToHandle raw.img,
raw.width, raw.height, formMain.hDC, handle
End If

' draw image on picture box
If Not (handle Is Nothing) Then
formMain.img.Picture = handle
End If

End Sub




' Extract a fingerprint template from current image
Public Function ExtractTemplate() As Integer
Dim ret As Integer

' Set initial buffer size and allocate it
template.Size = GR_MAX_SIZE_TEMPLATE
' reallocate template buffer
ReDim Preserve template.tpt(template.Size)
ret = formMain.GrFingerXCtrl1.Extract(raw.img, raw.width,
raw.height, raw.res, template.tpt, template.Size, GR_DEFAULT_CONTEXT)
' if error, set template size to 0
' Result < 0 => extraction problem
If ret < 0 Then template.Size = 0
' Set real buffer size and free unecessary data
ReDim Preserve template.tpt(template.Size)
ExtractTemplate = ret
End Function

bruce.a...@yahoo.com

unread,
Feb 7, 2012, 11:19:28 AM2/7/12
to
This group has been marked read only on the Sybase server. In addition, the feed between Google and the Sybase server is not currently working. If you post through Google the post will never show up on the Sybase server, and most people who answer questions in that group will never see it. Instead, you may want to access the Sybase newsgroups directly at:
http://www.sybase.com/detail_list?id=11507&pageNum=1&multi=true&show=1248
0 new messages