Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Feb : Access violation while creating a new clinetsocket thread.

www.cryer.info
Managed Newsgroup Archive

Access violation while creating a new clinetsocket thread.

Subject:Access violation while creating a new clinetsocket thread.
Posted by:"Halim" (hboumedjir..@idealss.com)
Date:Sat, 5 Feb 2005 17:52:17

When the network gets busy I get an access viloation with :SocketThread :=
TFileServerThread.Create(True, ClientSocket). The serve quit responding
right after that.

Is there anything wrong with the following SocketGetThread procedure?

procedure TMainForm.ServerSocketGetThread(Sender: TObject;
  ClientSocket: TServerClientWinSocket;
  var SocketThread: TServerClientThread);
begin
  try
    SocketThread := TFileServerThread.Create(True, ClientSocket);
  except
    on e: exception do
      SendMessage(MainForm.Listbox1.Handle, LB_INSERTSTRING, 0,
Integer(PChar(DateTostr(Date) + ' ' + TimeTostr(time) + ': Error 00053 :' +
E.Message)));
  end;

end;

Thank you,
Halim

Replies:

www.cryer.info
Managed Newsgroup Archive