PDA

Click to See Complete Forum and Search --> : Error # ' 10049'


m0xin
May 7th, 2001, 04:57 PM
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 :confused: . 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

plenderj
May 8th, 2001, 02:44 AM
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

m0xin
May 8th, 2001, 02:58 PM
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.

plenderj
May 9th, 2001, 02:12 AM
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.


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

m0xin
May 9th, 2001, 04:28 PM
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 :)