Results 1 to 3 of 3

Thread: WinSock Error 10047

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    1

    Question

    Hello,

    Can anyone help me with following problem:

    When using the Winsock control in UDP mode, I get the error:

    Run-time error '10047'
    Address family not supported

    when I stop the program and give another IP address, I can run the program again. I have to go through this procedure every time I want to run this program.

    What can this be?

    Thanks in advance,

    Jo.

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    Since you didn't post any code, all I can provide is the following link.
    List of WinSock 2 Error Messages
    Let us know if it helped.

  3. #3
    New Member
    Join Date
    May 2017
    Posts
    1

    Re: WinSock Error 10047

    I recently spent nearly 3 days fighting this problem myself, it seems this is a bug that is an artifact of the VB6 IDE, possibly revealed by a s/w upgrade in the OS because I don't recall seeing it a long time ago.

    Through painful observation, I have discovered that this error message is a "red herring"... it is false, and does not really describe the problem...

    Starting up VB6 and loading a UDP project, the error message will occur if you run the program without first displaying the FORM object in the IDE window. ( not the code window... the FORM object itself... )

    Showing the FORM object ( displaying it in the IDE window ) causes the PROPERTIES window ( for that form ) to load in the right sidebar, and apparently that causes all the form objects to initialize...

    Repeating...

    I find my UDP / Winsock program runs without errors if I start VB6 and then "show" the FORM object BEFORE running the program in the VB6 IDE window.

    If I start VB6 and try to run the program WITHOUT "showing" the FORM object, I get ERROR 10047, every time.

    It's confusing because the problem vanishes after the FORM object is shown just once, in any particular VB6 IDE session... so it can seem like a random problem each time a VB6 session is started, depending on whether or not the FORM is displayed before running the program.... and once it is displayed, it won't happen again in that VB6 IDE session, but it WILL happen again in the next VB6 IDE session.

    I also find the compiled version of my UDP program never shows this problem...

    I suspect ( and it's just a guess ) that running the program without first showing the form object means that the VB6 IDE must initialize all the objects when the RUN button is pressed, and somehow it doesn't really initialize the Winsock object completely, before the program is actually running and trying to use it. ( in other words, the Winsock initialize routines were not allows adequate time to finish their job )

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