Ok, using your code with the SETUP Proc change (not sure if you changed my class definitions other than that, but I'm using mine), and I'm getting an error that OBJECT is not found.
PROCEDURE DMSWinsockControlEvents_ConnectionRequest(requestID AS NUMBER) AS VOID HELPSTRING "Occurs when a remote client is attempting to connect"
#DEFINE sckClosed 0
IF THIS.OBJECT.State <> sckClosed
THIS.oSock.OBJECT.CLOSE
ENDIF
THIS.oSock.OBJECT.ACCEPT(requestID)
ENDPROC
>>Very quickly because there is no Setup procedure. Did you have some other error?
>
>Nope, the code works fine for me I got this printout:
>
>
>Event handler succeeded
>Server State 2
>Event handler succeeded
>Connected
>Connection accepted580
>Client State 7 Elapsed time: 0.165
>This is a test.
>
>
>which looks ok
>
>
>[Update] Oh! That is the problem, where do you have the eventhandler? Did you check is returning .T.??
>
>[Update 2] I see you did not read my message
Re: OLE Exception code using my class Thread #
1249645 Message #
1249699