program dll; {$APPTYPE CONSOLE} uses SysUtils; Function tcpconnect(ip:string;port,mode:longint):longint; cdecl; external '39dll.dll'; begin tcpconnect('127.0.0.1',4000,1); readln; end.