1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Runtime error 40006 with Winsock in VB6

Discussion in 'Software Development' started by snow_81us, Feb 23, 2005.

Thread Status:
Not open for further replies.
  1. snow_81us

    snow_81us Thread Starter

    Jul 11, 2004
    Hello all

    I am just learning how to use Winsock in VB6. So I made a small chat program. The problem that I have is as follows
    I ran the program on my machine and I did not have any problems, but when I tried to run it on a remote machine I ended up getting a Runtime error:40006 Wrong protocol.
    I looked at what microsoft had to say about this problem and I found that this error mostly occurs when the server/client tried to send data without a connection being established. So I included the following event
    Private Sub winsock_connect()
    cmdSend.Enabled = True
    MsgBox "The client is connected"
    End Sub
    Then I ended up with another problem. When I ran the program on my machine, the client connected to the server and I was able to send data to the server, but the send button never became active since the above event did not occur.
    Some one correct me if I am wrong but the client will send data to the server only if it is connected right?
    In that case the above event must occur! But for some reason it does not occur any one have any idea as to why this happens.

    Any help would be greatly appreciated
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/334008

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice