• Welcome to Valhalla Legends Archive.
 

winsock error capture help.

Started by OuTLawZGoSu, January 04, 2004, 02:26 PM

Previous topic - Next topic

OuTLawZGoSu

I would lik,e to know what are the errors that winsock might give you.
I only identified 2 errors.



Private Sub winsock_Error (......)

Select Case err.Number
Case "10060"
AddC vbRed, " Connection timed out. Try to reconnect to the internet. "
Case "0"
AddC vbRed, " Unable to connect to Battle.net. You might be IPbanned. "
Case Else
AddC vbRed, " Unable to connect to Battle.net. "
End Select

end sub



The 0 comes when I am ipbanned. i need some more error numbers.
If anyone knows more, plz let me know.

And if there is something wrong with this code, also let know.

Eric


Stealth

Also, Err.Number returns a numeric value, so you shouldn't use Case "10060" -- a string -- you should use simply Case 10060.

http://www.anzio.com/support/troubleshooting/winsockerrors.htm lists the Winsock error codes, but as LoRd said, it's easier to use Err.Description for this.
- Stealth
Author of StealthBot

UserLoser.

#3
If you're using mswinsck.ocx control, you shouldnt' have to use Err.Number or Err.Description - Your socket_Error() should look something like:


Private Sub sckWar3ATGameHost_Error(Index As Integer, ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)



Then you can just use Number, and Description

OuTLawZGoSu

@ Lord and Stealth: I know it would be easier to use err.description, but I just wanted to have something to do.

Mesiah / haiseM

Or you could just use the Error Lookup tool included with visual studio.
]HighBrow Innovations
Coming soon...

AIM Online Status: