⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tccomm_def.pas

📁 用microsoft vb6.0写的上班考勤系统!
💻 PAS
字号:
unit tccomm_def;

interface

type
    MJREC = record
          user_snr:integer;
          card_snr:Cardinal;
          datatime:string[12];
          record_type:byte;
          record_status:byte;
    end;

    REALTIMEDATA = record
          SysStatus:byte;
          OutPutStatus:byte;
          InputStatus:byte;
          Rec_Numver:smallint;
          user_snr:integer;
          card_snr:Cardinal;
          datatime:string[12];
          record_type:byte;
          record_status:byte;
    end;

    UserInfo_C = record
          snr:word;
          group:byte;
          dispinfo:array[0..8] of char;
    end;


const libname='farecomm.dll';

function OpenComm(CommPort:integer):integer;stdcall;external libname;
function CloseComm(icdev:integer):integer;stdcall;external libname;

function TestComm(icdev:integer;NodeAddr:smallint):integer;stdcall;external libname;
function GetPassword(icdev:integer;NodeAddr:smallint;Password:pchar):integer;stdcall;external libname;
function Hand_Shake(icdev:integer;NodeAddr:smallint;Password:string):integer;stdcall;external libname;
function Get_Sys_Info(icdev:integer;var Device_Type:integer;var Device_Ver:integer):integer;stdcall;external libname;
function Set_Time(icdev:integer;DateTime:String):integer;stdcall;external libname;
function Get_Time(icdev:integer;DateTime:pchar):integer;stdcall;external libname;
function WriteData(icdev:integer;num:word;Data:string):integer;stdcall;external libname;
function ReadData(icdev:integer;num:word;Data:pchar):integer;stdcall;external libname;
function Clear_All_Data(icdev:integer):integer;stdcall;external libname;
//
function Set_Author(icdev:integer;Start_Addr:smallint;Len:integer;Author_Data:string):integer;stdcall;external libname;
function Set_TimeAuthor(icdev:integer;Start_Addr:smallint;Len:integer;Author_Data:pchar):integer;stdcall;external libname;
function Get_Author(icdev:integer;Start_Addr:smallint;Len:integer;Author_Data:pchar):integer;stdcall;external libname;
function Get_Time_Author(icdev:integer;Start_Addr:smallint;Len:integer;Author_Data:pchar):integer;stdcall;external libname;
function Set_TimeTable(icdev:integer;TimeSeg_Data:String):integer;stdcall;external libname;
function Get_TimeTable(icdev:integer;TimeSeg_Data:pchar):integer;stdcall;external libname;
//
function Get_MJ_Curr_Record(icdev:integer;var Node_Addr:integer;Record_Data:pchar):integer;stdcall;external libname;
function Get_MJ_Next_Record(icdev:integer;var Node_Addr:integer;Record_Data:pchar):integer;stdcall;external libname;
function Get_MJ_Record(icdev:integer;recnum:integer;var Node_Addr:integer;Record_Data:pchar):integer;stdcall;external libname;
function Real_Query(icdev:integer;Node_Addr:smallint;Query_Data:pchar):integer;stdcall;external libname;
function Relay_Control(icdev:integer;Relay_Num,ON_OFF:integer):integer;stdcall;external libname;
function Set_MJ_Para(icdev:integer;var Para:smallint):integer;stdcall;external libname;
function Get_MJ_Para(icdev:integer;var para:smallint):integer;stdcall;external libname;
function Get_MJ_Curr_Record_N(icdev:integer;var Node_Addr:integer;Record_Data:MJREC):integer;stdcall;external libname;
function Get_MJ_Next_Record_N(icdev:integer;var Node_Addr:integer;Record_Data:MJREC):integer;stdcall;external libname;
function Get_MJ_Record_N(icdev:integer;rec_snr:integer;var Node_Addr:integer;Record_Data:MJREC):integer;stdcall;external libname;
function Real_Query_N(icdev:integer;Node_Addr:smallint;Query_Data:REALTIMEDATA):integer;stdcall;external libname;
//
function SetUserAuthor(Node,UserSerno,Author:integer):integer;stdcall;external libname;
function GetUserAuthor(Node,UserSerno:integer;var Author:integer):integer;stdcall;external libname;
function DownLoadAuthor(icdev,Node,num:integer):integer;stdcall;external libname;
function SetUserTimeAuthor(Node,UserSerno:integer;Author:word):integer;stdcall;external libname;
function GetUserTimeAuthor(Node,UserSerno:integer;var Author:word):integer;stdcall;external libname;
function DownLoadTimeAuthor(icdev,Node,num:integer):integer;stdcall;external libname;
//
function Init_Modem(icdev:integer):integer;stdcall;external libname;
function Dialup(icdev:integer;phone_num:String;delay:integer):integer;stdcall;external libname;
function Handup(icdev:integer):integer;stdcall;external libname;

// for id card
function AddCard(icdev:integer;card_snr:word;user_group:integer;disp_info:string):integer;stdcall;external libname;
function AddCard_D(icdev:integer;card_snr:word;user_group:integer;user_num:integer):integer;stdcall;external libname;
function DeleteCard(icdev:integer;card_snr:word):integer;stdcall;external libname;
function ClearAllUser(icdev:integer):integer;stdcall;external libname;
function SetUserInfo(icdev:integer;block:integer;userinfo:string):integer;stdcall;external libname;
function SetUserInfo_C(icdev:integer;block:integer;userinfo:UserInfo_C;num:integer):integer;stdcall;external libname;

//      int __stdcall AddCard(HANDLE icdev,unsigned long card_snr,int user_group,uchar *disp_info);
//      int __stdcall DeleteCard(HANDLE icdev,unsigned long card_snr);
//      int __stdcall ClearAllUser(HANDLE icdev);
//      int __stdcall SetUserInfo(HANDLE icdev,int block,uchar *user_info);


implementation

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -