Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > using API
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 30366 of 31576
Post > Topic >>

using API

by Mark Desser <someknowhow@[EMAIL PROTECTED] > May 26, 2008 at 05:59 PM

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
cra****ng.

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
 




 1 Posts in Topic:
using API
Mark Desser <someknowh  2008-05-26 17:59:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 23:10:23 CST 2008.