CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2000
    Location
    Texas
    Posts
    2

    Winsock Control Woes

    I am using VB6 Professional Edition on Windows NT SP 6a. Currently I am implementing a winsock control that connects to a remote port. The remote port is set at "3000"
    and a fixed IP address. The local port is set to "0" so that we can dynamically connect to the server many times w/o worrying about the reuse of local ports. The problem
    that I am experiencing is that the first connection to the server is successful while running in IDE. However, after stopping the program and running it again the connection
    state of this particular control is stuck at a connection state of "6" which means that it is attempting to connect. I've already attempted putting it in a loop while checking the
    state but it never changes to a state of "7" which means it's connected. Ultimately, when I try to send data at that point I get an error of "40006". I've seen suggestions
    regarding the use of Active X Controls but am looking for an alternative within the VB 6 deliverable environment. I've also attempted the code on a PC running Windows 95
    and VB 6 Enterprise Edition and have seen the same results eliminating the thought of it being an OS problem. I don't know much about the server at this point but it was not developed in VB.


  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: Winsock Control Woes

    The Winsock control isn't going to Connect until the Remote Server Accepts the Connection Request on the Specified Port, I would Try using something like "TelNet" to establish which Port(s) the Remote Server is listening on and will accept a Connection via.

    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Certified AllExperts Expert: http://www.allexperts.com/displayExp...p?Expert=11884
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

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

Featured