Results 1 to 3 of 3

Thread: Winsock Problems

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Location
    oxford, UK
    Posts
    149

    Winsock Problems

    I am using the Winsock control in an ActiveX dl project by adding it to a dummy form in the project.

    Pr
    VB Code:
    1. ivate WithEvents objMyWSock As Winsock
    2.  
    3. Private Sub Class_Initialize()
    4.     Set objMyWSock = frmDummy.Winsock
    5. End Sub
    6.  
    7. Private Sub Class_Terminate()
    8.     objMyWSock.Close
    9.     Set objMyWSock = Nothing
    10. 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!

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177

    Re: Winsock Problems

    What does your connect code look like?

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Location
    oxford, UK
    Posts
    149

    Re: Winsock Problems

    attached is the test project.

    ta
    Kest
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width