-
Function Definition
sUserID.iIDStructSize = sizeof(tsFL_ID_INFO) ;
Need to define the following function under VB but get some troubles while calling it:
Under C++:
Function: FingerLocEnroll(
// tsFL_ID_INFO* pUserID
// uint16 uiFingerToEnroll
// void* pTemplatePtr
// int16 iTemplateStorageSize
// int16* piTemplateResultSize
// tsFL_MATCH_CRITERIA* pMatchSetup)
Under Vb5:
Declare Function FingerLocEnroll Lib "flrpc.dll" Alias "#1" (ByRef PUserID As tsFL_ID_INFO, ByVal UIFingerToEnroll As Integer, ByRef PTemplatePtr As Long, ByVal ITemplateStorageSize As Integer, ByRef PITemplateResultSize As Integer, PMatchSetup As tsFL_MATCH_CRITERIA) As Long
When I call it:
Dim Est As tsFL_ID_INFO
Dim PMS As tsFL_MATCH_CRITERIA
Dim pm, pm3 As Variant
Dim pm1, pm2 As Integer
b = FingerLocEnroll(Est, 7, pm, pm1, pm2, PMS)
Where:
Type tsFL_MATCH_CRITERIA
iFARRequested As Integer
iFRRRequested As Integer
bFARPrecedence As Boolean
End Type
Type tsFL_ID_INFO
iIDStructureSize As Integer
iUserID(23) As Byte
iDisplayName(73) As Byte
End Type
When I do this, I get or 0 or a violation error and ends the program.
According to the docs, the parameters are:
// pUserID:
// Pointer to an allocated tsFL_ID_INFO structure that
// specifies the user to enroll. If NULL, no enroll data
// is stored in the FingerLoc database.
//
// uiFingerToEnroll:
// Specifies the number of the finger being enrolled (1 - 10)
// during enroll mode.
//
// pTemplatePtr:
// Pointer to an allocated buffer used to return the
// reference template. If NULL, no template data is returned
// to the calling program.
//
// iTemplateStorageSize:
// Size of allocated template buffer passed in during enroll
// mode. Must be set to zero during template size return mode.
//
// piTemplateResultSize:
// Pointer to a variable used to return the size of an
// enroll template. This value is returned when both pUserID and
// pTemplatePtr are NULL.
//
// pMatchSetup:
// Not used.
Any help will be appreciated.
Thanks.