Larry,
Thanks for the info, if only this worked it would solve all my problems (well almost). Unfortunately I get the feeling that it simply does not with the WinSock control.
Below is a compressed version of the code I am using, am I doing something stupid or is this simply not possible?
Thanks,
Nick
LOCAL loVFPCom, loWinsock, loVFPWinSock
loVFPCom=CREATEOBJECT('VfpCom.ComUtil')
loWinsock=CREATEOBJECT('MSWinSock.WinSock')
loVFPWinSock=CREATEOBJECT('DMSWinsockControlEvents')
loVfpCom.BindEvents(loWinSock, loVFPWinSock)
? "Begin"
loWinSock.Close() && This line does not seem to work
? "After WinSockClose (which has not worked) but before VFPWinSockClose"
* loVFPWinSock.Close() && But this one does, just as if the objects have not bound correctly
? "End"
loVfpCom.UnBindEvents(loWinSock, loVFPWinSock)
DEFINE CLASS DMSWinsockControlEvents AS custom
PROCEDURE Close
* Add user code here
? "In VFP WinSock Close Event"
ENDPROC
PROCEDURE Connect
* Add user code here
ENDPROC
PROCEDURE ConnectionRequest(requestID)
* Add user code here
ENDPROC
PROCEDURE DataArrival(bytesTotal)
* Add user code here
ENDPROC
PROCEDURE Error(Number,Description,Scode,Source,HelpFile,HelpContext,CancelDisplay)
* Add user code here
ENDPROC
PROCEDURE SendComplete
* Add user code here
ENDPROC
PROCEDURE SendProgress(bytesSent,bytesRemaining)
* Add user code here
ENDPROC
ENDDEFINE