SetTCPConnectionOptions
Declaration
Delphi
function SetTCPConnectionOptions(arguments :PANSICHAR; arglen : integer):boolean; register;
C/C++
SOPAD_API BOOL SetTCPConnectionOptions(char *arguments, arglen : integer) stdcall;
ActiveX
HRESULT _stdcall SetTCPConnectionOptions([in] BSTR arguments, [in] long argLen, [out, retval] VARIANT_BOOL* Result);
Description
The function SetTCPConnectionOptions allows to change the TCP-IP settings while runtime. The config.ini is still required, because this function only overrides the initial values from the INI file. If you don´t have a Config.ini you will get an Error about missing Configuration, to solve this Problem you can place a config.ini with IP 0.0.0.0 inside your application folder.
Arguments
connectionsettings
String value, which contains the IP and Port of the client
length
Numerical value with length of the connectionsettings string
Structure of the connectionsettings
The String contains the IP-Address (or Hostname) and the Port of the Client.
Example:Â
"ip=192.168.5.77; port=8888"
Sample
string connectionsettings = "ip=192.168.5.77; port=8888"; bool con = SigDev.SetTCPConnectionOptions(connectionsettings, connectionsettings.Length);
Dim TCPSettings As String TCPSettings = "ip=192.168.5.77;port=8888" SignatureDevice.SetTCPConnectionOptions(TCPSettings, TCPSettings.Length)
procedure TFormMain.setTcpOptions1Click(Sender: TObject); Var arguments:AnsiString; Var argsLen : integer; var retval :boolean; begin arguments := 'ip=192.168.5.77;port=8888'; argsLen := Length(arguments); retval := MYSOPadDll.SetTCPConnectionOptions(PAnsiChar(arguments),argsLen); end;