Ik lees een belgische EID uit via VBA in access 2003.
Dit lukt allemaal wel alleen de pasfoto wordt uitgelezen als een array of bytes.
Maar ik weet niet hoe ik dit moet doen.
Kan iemand mij op weg helpen?
Het is de "Pasfoto_temp" die ik wil tonen in een venster op het formulier.
De code die ik nu gebruik is :
Sub TestEID()
'
' TestEID Macro
'
'
Dim EIDlib1 As New EIDLIBCTRLLib.EIDlib
Dim lhandle As Long
Dim RetStatus As New EIDLIBCTRLLib.RetStatus
Dim MapColPicture As New EIDLIBCTRLLib.MapCollection
Dim MapColID As New EIDLIBCTRLLib.MapCollection
Dim MapColAddress As New EIDLIBCTRLLib.MapCollection
Dim CertifCheck As New EIDLIBCTRLLib.CertifCheck
Dim strName As String
Dim strFirstName1 As String
Dim strBirthPlace As String
Dim strBirthDate As String
Dim strGender As String
Dim strNationality As String
Dim strNationalNumber As String
Dim strStreet As String
Dim strZipcode As String
Dim strMunicipality As String
Dim Pasfoto_Temp As Variant
Set RetStatus = EIDlib1.Init("", 0, 0, lhandle)
Set RetStatus = EIDlib1.GetID(MapColID, CertifCheck)
strName = MapColID.GetValue("Name")
strFirstName1 = MapColID.GetValue("FirstName1")
strBirthDate = MapColID.GetValue("BirthDate")
strBirthPlace = MapColID.GetValue("BirthPlace")
strGender = MapColID.GetValue("Gender")
strNationality = MapColID.GetValue("Nationality")
strNationalNumber = MapColID.GetValue("NationalNumber")
Set RetStatus = EIDlib1.GetAddress(MapColAddress, CertifCheck)
strStreet = MapColAddress.GetValue("Street")
strZipcode = MapColAddress.GetValue("ZIPCode")
strMunicipality = MapColAddress.GetValue("Municipality")
Set RetStatus = EIDlib1.GetPicture(MapColPicture, CertifCheck)
Pasfoto_Temp = MapColPicture.GetValue("Picture")
Set RetStatus = EIDlib1.Exit
MsgBox strName & ", " & strFirstName1 & vbCrLf & _
strStreet & vbCrLf & _
strZipcode & " " & strMunicipality & vbCrLf,
vbOKOnly
End Sub
Dit lukt allemaal wel alleen de pasfoto wordt uitgelezen als een array of bytes.
Maar ik weet niet hoe ik dit moet doen.
Kan iemand mij op weg helpen?
Het is de "Pasfoto_temp" die ik wil tonen in een venster op het formulier.
De code die ik nu gebruik is :
Sub TestEID()
'
' TestEID Macro
'
'
Dim EIDlib1 As New EIDLIBCTRLLib.EIDlib
Dim lhandle As Long
Dim RetStatus As New EIDLIBCTRLLib.RetStatus
Dim MapColPicture As New EIDLIBCTRLLib.MapCollection
Dim MapColID As New EIDLIBCTRLLib.MapCollection
Dim MapColAddress As New EIDLIBCTRLLib.MapCollection
Dim CertifCheck As New EIDLIBCTRLLib.CertifCheck
Dim strName As String
Dim strFirstName1 As String
Dim strBirthPlace As String
Dim strBirthDate As String
Dim strGender As String
Dim strNationality As String
Dim strNationalNumber As String
Dim strStreet As String
Dim strZipcode As String
Dim strMunicipality As String
Dim Pasfoto_Temp As Variant
Set RetStatus = EIDlib1.Init("", 0, 0, lhandle)
Set RetStatus = EIDlib1.GetID(MapColID, CertifCheck)
strName = MapColID.GetValue("Name")
strFirstName1 = MapColID.GetValue("FirstName1")
strBirthDate = MapColID.GetValue("BirthDate")
strBirthPlace = MapColID.GetValue("BirthPlace")
strGender = MapColID.GetValue("Gender")
strNationality = MapColID.GetValue("Nationality")
strNationalNumber = MapColID.GetValue("NationalNumber")
Set RetStatus = EIDlib1.GetAddress(MapColAddress, CertifCheck)
strStreet = MapColAddress.GetValue("Street")
strZipcode = MapColAddress.GetValue("ZIPCode")
strMunicipality = MapColAddress.GetValue("Municipality")
Set RetStatus = EIDlib1.GetPicture(MapColPicture, CertifCheck)
Pasfoto_Temp = MapColPicture.GetValue("Picture")
Set RetStatus = EIDlib1.Exit
MsgBox strName & ", " & strFirstName1 & vbCrLf & _
strStreet & vbCrLf & _
strZipcode & " " & strMunicipality & vbCrLf,
vbOKOnly
End Sub