declaredll.~pas

来自「485 ID卡读头」· ~PAS 代码 · 共 44 行

~PAS
44
字号
unit declaredll;

interface
     //打开串口
     function PortOpen(comport:integer):thandle;stdcall;external 'sycomdll.dll';
     //关闭串口
     function PortClose(ComportHandle:thandle):boolean;stdcall;external 'sycomdll.dll';

     //设置设备号
     function SetDeviceNo(ComportHandle:thandle;Jihao_old:integer;Jihao_new:integer):integer;stdcall;external 'sycomdll.dll';

     //蜂鸣器响一声
     function SetBeep(ComportHandle:thandle;Jihao:integer;BeepXms:integer):integer;stdcall;external 'sycomdll.dll';

     //蜂鸣器响一声扩展
     function SetBeepEx(ComportHandle:thandle;Jihao:integer;beeptimes:integer;beepinterval:integer;loopcount:integer):integer;stdcall;external 'sycomdll.dll';

     //关闭蜂鸣器
     function CloseBeep(ComportHandle:thandle;Jihao:integer):integer;stdcall;external 'sycomdll.dll';

     //读取设备号
     function GetDeviceNo(ComportHandle:thandle;JihaoStr:pchar):integer;stdcall;external 'sycomdll.dll';

     //读取刷卡卡号,以字符串方式返回
     function GetCardNoForString(ComportHandle:thandle;Jihao:integer;CardNoString:pchar):integer;stdcall;external 'sycomdll.dll';
     //读取刷卡卡号,以数组的方返回
     function GetCardNoForByte(ComportHandle:thandle;Jihao:integer;CardNoBuf:pbyte):integer;stdcall;external 'sycomdll.dll';
     //读取按键输入串,以字符串的方式返回
     function GetKeyInputForString(ComportHandle:thandle;Jihao:integer;KeyInputString:pchar):integer;stdcall;external 'sycomdll.dll';
     //发送信息到屏幕显示
     function SetDispFull(ComportHandle:thandle;Jihao:integer;DispString:pchar):integer;stdcall;external 'sycomdll.dll';
     //精密延时
     procedure Delay_ms(xms:LongWord);stdcall;external 'sycomdll.dll';



const
    dllfilename = 'sycomdll.dll';  //读块0

implementation


end.

⌨️ 快捷键说明

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