how to get log from attendance machine in powerbuilder?

49 Views Asked by At

I'd like guidance on retrieving attendance logs from an attendance machine using PowerBuilder. Additionally, I need assistance on utilizing the zkemkeeper.dll for this purpose.

Thank you.

** tried to use the following code :**

int dwTMachine, dwEnrollNumber,dwEMachineNumber,dwVerifyMode
int dwInOutMode,dwYear,dwMonth,dwDay,dwHour,dwMinute
int i
i=1
if main.ZKEM.object.ReadGeneralLogData(machineNum) then
   do while main.ZKEM.object.GetGeneralLogData(MachineNum,ref dwTMachine,ref dwEnrollNumber,ref dwEMachineNumber,ref dwVerifyMode,ref  dwInOutMode,ref dwYear,ref dwMonth,ref dwDay,ref dwHour,ref dwMinute)
        listviewitem l_lvi
        lv_log.AddItem(l_lvi)
        lv_log.SetItem(i,1,string(i))
        lv_log.SetItem(i,2,string(dwEnrollNumber))
        lv_log.SetItem(i,4,string(dwVerifyMode))
        lv_log.SetItem(i,5,string(MachineNum))
        lv_log.SetItem(i,6,string(dwInOutMode))
        
        i=i+1
        
    loop 
end if

But it gives me the following error message: Error calling external object function getgenerallogdata

1

There are 1 best solutions below

1
Matt Balent On

Are the methods in the dll exposed? In general you would use COM to communicate with external resources like this. You could write a COM wrapper for the dll (in C# for example) and then call the methods needed from that.