I have an Access Violation at address 00000, I googled on this and found that this means a reference to a null.
Basically I have implemented my Application based on "ThrdSrvV2_1" demo project, The problem happens as Follows: The Client connects to the Server, then requests data, I then Close the Client Application (Terminate / end task). the server then runs into this Routine: I am not sure where the Error is precisely, I think it is when the Windows Message gets processed. inside the "Forms unit" of delphi. Any Ideas. {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { We have to attach client socket to this thread's context and then } { process messages so that TWSocket events works. } procedure TClientThread.Execute; begin if not Assigned(WSocket) then Exit; { Attach client socket to this thread } WSocket.ThreadAttach; { Signal main thread that we've attached socket to this thread } ThreadAttached := TRUE; { Now let main thread continue starting the connection. } { This little avoid race condition. } Sleep(0); { Let's block on critical section already owned by main thread } EnterCriticalSection(FCritSect); LeaveCriticalSection(FCritSect); { Then process messages until WM_QUIT message is posted. } { TWSocket is event-driven. So even when used within a thread, we } { have to have a "message pump". Any message pump will do and there } { is one built in TWSocket, so use it ! } WSocket.MessageLoop; { Be sure to have main thread waiting for termination before terminating} Sleep(0); { Detach the hidden window from within the thread } WSocket.ThreadDetach; end; -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be