I have an sdk that I need to use (secbank.dll to access the Biometrika
Fx3000 fingerprint scanner)
I have had to covert from the 'C' header file sample into a VB DLL
function, but I've obviously go it wrong because Access keeps on
crashing.
I think the problem is with 'fileName' parameter - any obvious mistake?
(the maximum file length is 16 characters)
C ORIGINAL:
SECBANKDLL_API UINT SB_CALLMODE SecBank_Create (Device Disp, char
*fileName, DWORD *IDSecBank, BYTE *Pin, DWORD lenPin); //Creates a new
SecBank on the scanner RAM
VB:
Public Declare Function SecBank_Create Lib "SecBank.dll" (ByVal Device
As Long, ByVal afileName As Byte, ByVal aIDSecBank As Long, ByRef aPin
As Byte, ByVal lenPin As Long) As Integer 'Creates a new
SecBank on the scanner RAM
Code:
Dim RetV As Long
Dim SB_ID As Long
Dim PinArr() As Byte
Dim FileName() As Byte
Const IDDevFlashScanner As Long = 1
Const Pin As String = "12345678901234567890123456789012"
Const FName As String = "FileName00123456"
PinArr() = StrConv(Pin, vbFromUnicode)
FileName() = StrConv(FName, vbFromUnicode)
RetV = SecBank_Create(IDDevFlashScanner, FileName(0), SB_ID, PinArr(0), 32)
If RetV <0 Then Call FPErrMsg(RetV)
--
Mark Desser