动态库代码如下:library socketdll;
uses
  sharemem,  SysUtils,  Classes,
    ScktComp,QDialogs;{$R *.res}
var ClientSocket1: TClientSocket;function ConnectServer(ls_ip:pchar;li_port:integer):integer;stdcall;
begin
  result:=1;
  ClientSocket1:=TClientSocket.Create(nil);
  with ClientSocket1 do
  begin
    Port :=4001;
    host := '192.168.0.89';
    active:= true;
  end;
 // clientsocket1.Open;
  if clientsocket1.Active then  
//----这里clientsocket1.Active 始终是 false
  begin
    showmessage('ok');
  end;end;{procedure ClientSocket1Connecting(Sender: TObject;
  Socket: TCustomWinSocket);
}
exports
ConnectServer index 1 name 'ConnectServer' resident;begin
end.
/---------------------------------------------------问题: