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

📄 smsys_dll.dpr

📁 SPServer.rar一个基于TCP/IP监听发送代码
💻 DPR
📖 第 1 页 / 共 2 页
字号:
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteInteger('SenAnswTime',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//获取日志标志
function GetCurLogChk:Boolean;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', False)
      then Result:=Reg.ReadBool('CurLogChk');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置日志标志
procedure SetCurLogChk(Value:Boolean);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteBool('CurLogChk',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//读取查询记录数
function ReadCXRecord:LongInt;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True) then
     if not Reg.ValueExists('CXRecord')
      then Reg.WriteInteger('CXRecord',0);
     if Reg.OpenKey('\Software\ServerParameter', False)
      then Result:=Reg.ReadInteger('CXRecord');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//写查询记录数
procedure WriteCXRecord(Value:LongInt);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteInteger('CXRecord',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//读取发送记录数
function ReadSNDRecord:LongInt;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True) then
     if not Reg.ValueExists('SNDRecord')
      then Reg.WriteInteger('SNDRecord',0);
    if Reg.OpenKey('\Software\ServerParameter', False)
      then Result:=Reg.ReadInteger('SNDRecord');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//写发送记录数
procedure WriteSNDRecord(Value:LongInt);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteInteger('SNDRecord',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//获取触发服务类型
function GetSvcTypeTran:string;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', False)
      then Result:=Reg.ReadString('SvcTypeTran');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置触发服务类型
procedure SetSvcTypeTran(Value:string);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteString('SvcTypeTran',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//获取SP服务类型
function GetSPSvcType:string;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', False)
      then Result:=Reg.ReadString('SPSvcType');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置信息返回付费方式
procedure SetCharge(Value:integer);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteInteger('Charge',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置信息返回付费方式
function GetCharge:integer;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', False)
      then Result:=Reg.ReadInteger('Charge');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

//设置SP服务类型
procedure SetSPSvcType(Value:string);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteString('SPSvcType',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\ServerParameter', 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\ServerParameter', True)
      then Reg.WriteString('Time',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\ServerParameter', False)
      then Result:=Reg.ReadInteger('ReSendTry');
  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\ServerParameter', True)
      then Reg.WriteInteger('ReSendTry',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

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

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

function GetFeeTime:string;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', False)
      then Result:=Reg.ReadString('FeeTime');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

procedure SetFeeTime(Value:string);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteString('FeeTime',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

function GetSPNumber:string;stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', False)
      then Result:=Reg.ReadString('SPNumber');
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

procedure SetSPNumber(Value:string);stdcall;
begin
  Reg:=TRegistry.Create;
  try
    Reg.RootKey:=HKEY_LOCAL_MACHINE;
    if Reg.OpenKey('\Software\ServerParameter', True)
      then Reg.WriteString('SPNumber',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\ServerParameter', 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\ServerParameter', True)
      then Reg.WriteInteger('TimeCycle',Value);
  finally
    Reg.CloseKey;
    Reg.Free;
  end;
end;

exports
  GetLocalIP,
  GetProgBar,
  ResultDataFmt,
  ResultDataLayout,
  CheckPhone,
  GetHostPort,
  SetHostPort,
  GetSeurity,
  SetSeurity,
  GetReSend,
  SetReSend,
  GetREC_UPT,
  SetREC_UPT,
  GetSND_UPT,
  SetSND_UPT,
  GetWarning,
  SetWarning,
  GetMangPhone,
  SetMangPhone,
  GetAnswerTime,
  SetAnswerTime,
  GetInterval,
  SetInterval,
  GetExpireTime,
  SetExpireTime,
  GetSenAnswTime,
  SetSenAnswTime,
  GetCurLogChk,
  SetCurLogChk,
  ReadCXRecord,
  WriteCXRecord,
  ReadSNDRecord,
  WriteSNDRecord,
  GetSvcTypeTran,
  GetSPSvcType,
  SetCharge,
  SetSvcTypeTran,
  SetSPSvcType,
  Get_Time,
  SetTime,
  GetCharge,
  SetSendTry,
  GetSendTry,
  SetFeeDate,
  GetFeeDate,
  SetFeeTime,
  GetFeeTime,
  SetSPNumber,
  GetSPNumber,
  SetTimeCycle,
  GetTimeCycle;
//  OpenSocket,
//  BindnListen;

end.

⌨️ 快捷键说明

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