?? sys32dll.~dpr
字號:
//讀取發送超時參數
function GetSendTimeOut:Integer;stdcall;
begin
Reg:=TRegistry.Create;
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 GetSNDUPT: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 SetSNDUPT(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;
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
Delay;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -