troubleshooting Question

c dll calling from VB6 - Parameter Error

Avatar of Harsh08
Harsh08 asked on
CVisual Basic ClassicVisual Basic.NET
11 Comments1 Solution1961 ViewsLast Modified:
Private Declare Function SSR_GetGeneralLogData Lib "c:\Windows\System32\zkemkeeper.DLL" (ByVal dwMachineNumber As Long, _
ByVal dwEnrollNumber As String, ByVal dwSize As Long, ByVal dwVerifyMode As Long, _
ByVal dwInOutMode As Long, ByRef dwYear As Long, ByRef dwYear As Long, ByRef dwMonth As Long, ByRef dwDay As Long, ByRef dwHour As Long, ByRef dwMinute As Long, ByRef dwsecond As Long, ByRef dwWorkCode As Long) As Boolean

 Dim ver As String
    Dim vMachineNumber
    Dim dwEnrollNumber As String
    Dim dwVerifyMode As Long
    Dim dwInOutMode As Long
    Dim timeStr As String
    Dim i As Long
    Dim dwMachineNum As Long
    Dim dwEMachineNum As Long
    Dim dwYear As Long
    Dim dwMonth As Long
    Dim dwDay As Long
    Dim dwHour As Long
    Dim dwMinute As Long
    Dim dwsecond As Long
    Dim dwWorkCode As Long
    Dim dwReserved As Long
   
     Dim s As String
 
    'DLL PARAMETERS
    '[in] LONG dwMachineNumber,
    '[out] BSTR* dwEnrollNumber,
    '[out] LONG* dwVerifyMode,
    '[out] LONG* dwInOutMode,
    '[out] LONG* dwYear,
    '[out]LONG* dwMonth,
    '[out] LONG* dwDay,
    '[out] LONG* dwHour,
    '[out] LONG* dwMinute,
    '[out] LONG* dwSecond,
    '[out,retval] VARIANT_BOOL* pVal

   
    If CZKEM1.ReadGeneralLogData(1) Then
        BUFFER OVERRUN AFTER EXECUTING FOLLOWING LINE

        While CZKEM1.SSR_GetGeneralLogData(1, dwEnrollNumber, dwVerifyMode, dwInOutMode, dwYear, dwMonth, dwDay, dwHour, dwMinute, dwsecond, dwWorkCode)



        DoEvents
        i = i + 1
        'Write to database
       
        'MsgBox strSQL
'''''''            dbs.Execute strSQL, dbFailOnError
        Wend
        End If
        MsgBox "Processed Successfully!"
    End If
ASKER CERTIFIED SOLUTION
HooKooDooKu

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros