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

📄 sys32dll.dpr

📁 SPIG1.1.rar SPIG接口协议
💻 DPR
📖 第 1 页 / 共 2 页
字号:
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadInteger('SendTimeOut');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置发送超时参数
procedure SetSendTimeOut(Value:Integer);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteInteger('SendTimeOut',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//读取接收超时参数
function GetRecvTimeOut:Integer;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadInteger('RecvTimeOut');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置接收超时参数
procedure SetRecvTimeOut(Value:Integer);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteInteger('RecvTimeOut',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

function GetTimeCycle:Integer;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadInteger('TimeCycle');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

procedure SetTimeCycle(Value:Integer);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteInteger('TimeCycle',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//获取重发
function GetSendTry:Integer;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadInteger('SendTry');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置重发
procedure SetSendTry(Value:Integer);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteInteger('SendTry',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//获取重发标志
function  GetReSend:Boolean;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadBool('ReSend');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置重发标志
procedure SetReSend(Value:Boolean);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteBool('ReSend',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;


//获取安全标志//
function  GetSeurity:Boolean;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadBool('Security');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置安全标志//
procedure SetSeurity(Value:Boolean);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteBool('Security',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//获取SP节点编号//
function  GetSrcNode:string;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadString('SrcNode');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置SP节点编号//
procedure SetSrcNode(Value:string);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteString('SrcNode',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//获取SP企业代码//
function  GetSPCode:string;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadString('SPCode');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置SP企业代码//
procedure SetSPCode(Value:string);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteString('SPCode',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//自动启动服务器//
function  GetAutoRun:Boolean;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadBool('AutoRun');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置自动启动服务器//
procedure SetAutoRun(Value:Boolean);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteBool('AutoRun',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//获取信息触发时间
function Get_Time:string;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', False)
      then Result:=Reg.ReadString('Time');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置信息触发时间
procedure SetTime(Value:string);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\SGIPServerPar', True)
      then Reg.WriteString('Time',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//获取发送数据流量
function  GetSND_UPT:integer;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', False)
      then Result:=Reg.ReadInteger('SND_UPT');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置发送数据流量
procedure SetSND_UPT(Value:integer);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteInteger('SND_UPT',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

function GetProgBar(n:Integer):Real;stdcall;
var
 i:Real;
begin
i:=100 / n;
if i<1 then
 i:=RoundTo(i,-4);
Result:=i;
end;

procedure Delay(MSec: Word);stdcall;
var
  St,Ft:LongWord;
begin
  St:=GetTickCount;
  repeat
    Ft:=GetTickCount;
    Application.ProcessMessages;
  until Abs(Ft-St)>MSec;
end;

exports
  FmtChar,
  CheckIP,
  WriteLog,
  GetLocatIPAddr,
  SetLocatIPAddr,
  GetRemoteIPAddr,
  SetRemoteIPAddr,
  GetLocatHostPort,
  GetRemoteHostPort,
  SetLocatHostPort,
  SetRemoteHostPort,
  GetRecvHostPort,
  SetRecvHostPort,
  GetCurLogChk,
  SetCurLogChk,
  GetUserName,
  SetUserName,
  GetPassWord,
  SetPassWord,
  GetSPNumber,
  SetSPNumber,
  GetSendTimeOut,
  SetSendTimeOut,
  GetRecvTimeOut,
  SetRecvTimeOut,
  GetTimeCycle,
  SetTimeCycle,
  GetSendTry,
  SetSendTry,
  GetReSend,
  SetReSend,
  GetSeurity,
  SetSeurity,
  GetSrcNode,
  SetSrcNode,
  GetSPCode,
  SetSPCode,
  GetAutoRun,
  SetAutoRun,
  Get_Time,
  SetTime,
  GetSNDUPT,
  SetSNDUPT,
  GetProgBar,
  Delay;

end.
 

⌨️ 快捷键说明

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