📄 readcomm.~dpr
字号:
library readcomm;
uses
SysUtils,Inifiles,Classes;
{$R *.res}
var inifile:Tinifile;
function GetValue(Num:integer): integer; stdcall;
begin
If Num=1 then GetValue :=inifile.ReadInteger('com1','value',0);
If Num=2 then GetValue :=inifile.ReadInteger('com2','value',0);
end;
function GetStatus(Num:integer): integer; stdcall;
begin
If Num=1 then GetStatus:=inifile.ReadInteger('com1','status',0);
If Num=2 then GetStatus:=inifile.ReadInteger('com2','status',0);
end;
function SetCut1(Cut:integer): integer; stdcall;
begin
inifile.WriteInteger('com1','inew',cut);
inifile.UpdateFile;
SetCut1:=cut;
end;
function SetCut2(Cut:integer): integer; stdcall;
begin
inifile.WriteInteger('com2','inew',cut);
inifile.UpdateFile;
SetCut2:=cut;
end;
exports
GetValue,
GetStatus,
SetCut1,
SetCut2;
begin
inifile:=Tinifile.Create('inicomm.ini');
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -