unit callAPIMain;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    txt1: TEdit;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
  function clinkStart(const cfg:pchar):integer;cdecl;external 'clinkAPI.dll' name 'clinkStart';
var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
  str:string;
  cfg:pchar;
  ret:integer;
begin
   str:='Ai9oWTN/ezixcA4AAFzHfD530SLfyD1z1rfB4wlEhQ5MbLia0OlVze2TtTutnMXJ4om9c9eaioVGozR6vZYubLXPfimiLapTIQQ0'+
'SxMBxDnx9gB/hhE2seEzVCy12Q9WZUiE3R2cJrXdalHSZT5yRN35iMWVruWjmMxGb9d+nUfz3eXJe+YbVc9KoRu/Y0ujvw9OulBJ'+
'v7Vi4ERPVbbcX8wJ3YdXqMf23jP0Sw3J4zWBoq7IMOH1qh0wZpqiy/4ZbEJOtYTCSxdGVtsdVHOol/wOzbEIFC/pEzNpJ0EtVBIz'+
'297Key2vvleXgdgG2FWph82dk/1NEVgSY6JRWCPUGQLI6HeU3BzOXg5Zb5FV4zncv59zj78U5MqGtxeKXmUzwWfVPO7dFamxzTXu'+
'8qDFu39odJiDYYlBswSsDiUERP6oJqwpf6ZK/qr1wMCKJfApv/qXIenMr2Ddk4jqMAeDrIg1RczymzzYHnTsjZ/HfBAajICz/Zkb'+
'OaADfwzn9xpo5BIx+48AqEX1hdgD/RTluhKligmEu6ev73NRjA7kj+I5eD/f+4WReirqeMifVhqX7q70n3dzYm+dZ6ALj2nzjw2V'+
'JMxxxjFJnlduNIj/stkw+lkX9z2gcpaG+nSswD9tuugLVQKa82TCJwIbNazoDOiFX1ZbncTm3M2tzA67YzqdPvsVH2RbWpb1h+iU'+
'CLdo3JoBxDaf4/oqnGcN4Jkl4B+PChR+tc5kk6J6KDzwKNsONTO6q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Olk/BnQyqvGbdZjmO1VyNScA32nz4HLKzlNhMSSjRQyHvhBxZeo7+FRc0olVtMtJSkpmzYpPrVnlcw==';


   cfg:=pchar(str);
   ret:= clinkStart(cfg);
   if(ret=150) then
    txt1.Text:= '连接成功。ret='+inttostr(ret)
   else
       txt1.Text:='连接失败。ret='+inttostr(ret);
end;

end.
