Can any1 explain this error without seeing the coding ?
The code isn't mine is an example. I think its a winsock error. Can any1 help?
Printable View
Can any1 explain this error without seeing the coding ?
The code isn't mine is an example. I think its a winsock error. Can any1 help?
An overflow error is usually because you try to (for example) assign a number to an integer but the number is to large to fit in the 16-bit signer integer type VB is using. Other then that, it's very hard without seeing any code to determent what the problem is.
If you try to use a number that's bigger than 32678 in an INTEGER, it will produce an OVERFLOW condition because of the size limit for INTEGER.
It would help to see the code, with the error line in order to tell you exactly why it happened.
VB Code:
Private Sub tmrCheckIfClosed_Timer() '// Assign the list status to the list count lblCountUsernames.Caption = lstUsernames.ListIndex + 1 & "/" & lstUsernames.ListCount lblCountPasswords.Caption = lstPasswords.ListIndex + 1 & "/" & lstPasswords.ListCount lblCountProxys.Caption = lstProxys.ListIndex + 1 & "/" & lstProxys.ListCount lblCountServers.Caption = lstServers.ListIndex + 1 & "/" & lstServers.ListCount Dim intIndex As Integer For intIndex = 1 To Val(cboSockets.Text) '// Check for closed sockets (0, sckClosed) If wskSendLogin(intIndex).State = 0 Then '// Disable the timeout timer tmrTimeout(intIndex).Enabled = False Dim strHost As String, intPort As Integer '// Split the host and port from the proxy strHost = Split(strProxy(intIndex), ":")(0) [COLOR=Red] intPort = Split(strProxy(intIndex), ":")(1)[/COLOR] '// Close the socket wskSendLogin(intIndex).Close '// Assign the host and port to the socket wskSendLogin(intIndex).RemoteHost = strHost wskSendLogin(intIndex).RemotePort = intPort '// Request Connection wskSendLogin(intIndex).Connect '// Enabled the timeout timer tmrTimeout(intIndex).Enabled = True End If Next intIndex End Sub
it errored on this proxy 12.162.2.193:65208
assuming what you said because 65208 if more then 32678.
How i correct this ?
I tried Dim intIndex As Long instead of Integer, still errored.
intPort has to be a long. This worked fine.
VB Code:
Private Sub Form_Load() Dim strProxy As Long Dim str$ Dim x$, y As Long str = "12.162.2.193:65208" x = Split(str, ":")(0) y = Split(str, ":")(1) MsgBox x & " " & y End Sub
Change the type of intPort to be a Long instead of an Integer.
ooooo
didn't see that bit.
Thanks.