Results 1 to 5 of 5

Thread: Error # ' 10049'

  1. #1
    m0xin
    Guest

    Angry Error # ' 10049'

    I have spent about one month writing a account creation process for my AIM replica. I finally got it working and after about a week of that, I did something (not sure what) and I started getting a error # '10049'. I have no idea why . And the weirdest thing is that it's on a .connect line. Below is the code for logging in:

    gbNewUser = False
    If sockUser.State <> sckClosed Then sockUser.Close
    sockUser.RemoteHost = gbRHost
    sockUser.RemotePort = gbRPort
    sockUser.LocalPort = 0
    sockUser.Connect
    frmMain.stsStatus.Panels(1).Picture = frmMain.imlImages.ListImages(10).Picture
    frmMain.stsStatus.Panels(1).Text = Connected

    the gbNewUser = False line is so that the client realizes that it's just logging in, and not creating a new account. gbNewUser = True would mean a new account is being created. Then it checks for the connection state, sets the host and port, the .localport tag is not needed, just tried using that to fix it. sockUser.Connect is where the error comes in. I've set a break point on the line but nothing was found, except when I move on from there I get the error. I hope this is enough information for someone to help me... If it's not, just let me know and I can get you all the code you need to help. Thanks.

    m0xin

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    The 10049 error is defined as :

    10049 sckAddressNotAvailable Address not available from the local machine.

    So, I would imagine that either your remotehost or remoteport properties are mucked up ...

    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    m0xin
    Guest

    Question Hm

    I know what the error is but I don't understand why I am getting it. It was working fine before but all of a sudden it pooped on me.

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Replace the code you're using above with this code and tell me what it says. It will tell you the contents of the remotehost property.
    I think that is what's giving you troubles.

    Code:
    gbNewUser = False 
    If sockUser.State <> sckClosed Then sockUser.Close 
    sockUser.RemoteHost = gbRHost 
    sockUser.RemotePort = gbRPort 
    sockUser.LocalPort = 0 
    
    If (sockUser.RemoteHost = "") Then
        MsgBox "RemoteHost Property Is Empty"
    Else
        MsgBox "RemoteHost Property : " & sockUser.RemoteHost
    End If
    
    sockUser.Connect 
    frmMain.stsStatus.Panels(1).Picture = frmMain.imlImages.ListImages(10).Picture 
    frmMain.stsStatus.Panels(1).Text = Connected
    - jamie
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  5. #5
    m0xin
    Guest

    Smile Got it fixed

    After I posted my reply, I got it fixed. I had deleted the global variables... so it wasn't getting a remotehost. But anyway, I've got it fixed now. So thanks

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