I am using the Winsock control in an ActiveX dl project by adding it to a dummy form in the project.
PrVB Code:
ivate WithEvents objMyWSock As Winsock Private Sub Class_Initialize() Set objMyWSock = frmDummy.Winsock End Sub Private Sub Class_Terminate() objMyWSock.Close Set objMyWSock = Nothing End Sub
I have a number of problems.
1) First time I run it. it seems to connect with server OK. Subsequently (even if I stop debuggin and run app again) it remains in State=6 (sckConnecting). I have to restart the PC to get it to connect again! ANy ideas what I need to do? I already close it and set the obj to nothing when the class terminates.
2) setting break points or message boxes during debug seems to affect whether certain events (such as the Connect or DataArrival events) occur or not?!
3) the SendData method is called after connection is made but no data is received at server!
Not too sure how to address any of these!




Reply With Quote