Oneself want to develop a tool to automatically download control attendance attendance data,
Are defined as follows:
The Function Boolean Connect_Net (string IP, ref long interface) Library "zkemkeeper. DLL
"But when the call is always to quote the following error:
Bad runtime function refenrence this error,
The central zkemkeeper. The DLL file has been registered, cannot be done again, experienced a great god, please help me to diagnosis
CodePudding user response:
Under his roof, hope to have a great god can help me
CodePudding user response:
Use Delphi to closed DLL, give pb call again,
CodePudding user response:
I wouldn't use the DELPHI, have to reseal it
CodePudding user response:
Are used for intermediate OCX that insert olecontrol building Lord useless wrong
CodePudding user response:
refer to the original poster WXQBHSCL response: from already want to develop a tool to automatically download control attendance attendance data, Are defined as follows: The Function Boolean Connect_Net (string IP, ref long interface) Library "zkemkeeper. DLL "But when the call is always to quote the following error: Bad runtime function refenrence this error, The central zkemkeeper. The DLL file has been registered, cannot be done again, experienced a great god, please help me under the diagnosis The Function Boolean Connect_Net (string IP, ref long interface) Library "zkemkeeper. DLL" alias for "Connect_Net; Ansi " Try this statement CodePudding user response:
4th floor right, need to insert an OLE control can be used directly, the specific call look at central own pb sample code, different models have the difference,, //to connect machines Boolean bConn If zkem. Object. SetCommPassword (is_pass) then If zkem. Object. Connect_net (is_ip is_port) then //bConn=true MachineNum=1 The else MessageBox (" error ", "connect failed!" ) End the if End the if //download data MachineNum=1 If w_kqj. ZKEM. Object. ReadGeneralLogData (machineNum) then The do while w_kqj. ZKEM. Object. SSR_GetGeneralLogData (machineNum, ref dwEnrollNumber, ref dwVerifyMode, ref dwInOutMode, ref dwYear, ref dwMonth, ref dwDay, ref dwHour, ref dwMinute, ref dwSecond, ref dwWorkcode) Dw_1. Insertrow (0)//... Loop End the if CodePudding user response:
Insert an OLE control to do, The code String ls_machineno ls_empno, ls_qdfs, ls_kqzt Long ll_empno ll_qdfs, ll_kqzt ll_currow, ll_year, ll_month, ll_day, ll_hour, ll_minute, ll_second The date ld_qdrq Time lt_qdsj String ls_ipaddress ls_ljfs, ls_pinpai, ls_qdsj Long ll_ipport ll_comport, ll_boudrate Int I, j, k Boolean lb_connect Datetime ldt_downtime Ldt_downtime=datetime (today (), now ()) Cleargdata=https://bbs.csdn.net/topics/true For I=1 to dw_kqjinfo_list. Rowcount () Ll_machineno=dw_kqjinfo_list. Getitemnumber (I, 'machinenumber') Ls_ljfs=dw_kqjinfo_list. Getitemstring (I, 'LJFS') Ls_ipaddress=dw_kqjinfo_list. Getitemstring (I, 'ipadress') //messagebox (ls_ljfs, ls_ipaddress) Ll_ipport=4370 Ll_comport=dw_kqjinfo_list. Getitemnumber (I, 'comport') Ll_boudrate=dw_kqjinfo_list. Getitemnumber (I, 'boudrate') Ls_pinpai=dw_kqjinfo_list. Getitemstring (I, 'pinpai') Choose a case ls_ljfs Case 'TCP/IP' St_1. Text='connecting attendance machine, please later... ' Czkem. Object. Setcommpassword (123456) Lb_connect=czkem. Object. Connect_net (ls_ipaddress ll_ipport) If lb_connect then St_1. Text='connection is successful, start downloading data' If czkem. Object. Readallglogdata (ll_machineno) then Czkem. Object. EnableDevice (ll_machineno, false) The do while czkem. Object. GetGeneralLogData (ll_machineno, ref ll_machineno, ref ll_empno, ref ll_machineno, ref ll_qdfs, ref ll_kqzt, ref ll_year, ref ll_month, ref ll_day, ref ll_hour, ref ll_minute) Ls_machineno=string (ll_machineno, '0') Ls_empno=string (ll_empno, '00000') Ls_qdfs=string (ll_qdfs) Ld_qdrq=date (string (ll_year, '0000') + '-' + string (ll_month, '00') + '-' + string (ll_day, '00')) Lt_qdsj=time (string (ll_hour) + ', '+ string (ll_minute)) Ll_currow=dw_kqjrec. Insertrow (0) Dw_kqjrec. Setitem (ll_currow, 'SBBH, ls_machineno) Dw_kqjrec. Setitem (ll_currow, 'empno, ls_empno) Dw_kqjrec. Setitem (ll_currow, 'QDFS, ls_qdfs) Dw_kqjrec. Setitem (ll_currow, 'QDRQ, ld_qdrq) Dw_kqjrec. Setitem (ll_currow, 'QDSJ, datetime (ld_qdrq lt_qdsj)) Loop Dw_1. Retrieve (string (I), ldt_downtime) For k=1 to dw_1. Rowcount () Ll_currow=dw_kqjrec. Insertrow (0) Dw_kqjrec. Setitem (ll_currow, 'SBBH, dw_1 getitemstring (k,' SBBH)) Dw_kqjrec. Setitem (ll_currow, 'empno, dw_1 getitemstring (k,' empno)) Dw_kqjrec. Setitem (ll_currow, 'QDFS, dw_1 getitemstring (k,' QDFS)) Dw_kqjrec. Setitem (ll_currow, 'QDRQ, dw_1 getitemdatetime (k,' QDRQ)) Dw_kqjrec. Setitem (ll_currow, 'QDSJ, dw_1 getitemdatetime (k,' QDSJ)) Dw_1. Setitem (k, 'stat', '1') Next Czkem. Object. EnableDevice (ll_machineno, true) St_1. Text=string (ll_machineno) + 'attendance data downloading! ' Triggerevent (' ue_save) The else St_1. Text=string (ll_machineno) + 'attendance machine without attendance data! ' End the if The else St_1. Text=string (ll_machineno) + 'attendance machine connection fails, please check the attendance machine configuration! ' End the if Case 'RS232/RS485' //if j=I then //end if The end choose Next nullnull