Winsock Help!! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Winsock Help!!

AsheboyAsheboy Posts: 23Member
[code]Private Sub Command8_Click()
dog = dog + 1
Text6.Text = dog
End Sub

Private Sub Timer2_Timer()
Dim cat
If wordlist = loaded Then
Do Until dog = List1.ListCount
Call Command8_Click
cat = List1.List(dog)
Winsock1.RemoteHost = Text3.Text & cat & "." & Text4.Text
Text2.Text = Text3.Text & List1.List(dog) & "." & Text4.Text
Winsock1.RemotePort = 80
Winsock1.Connect
Open App.Path & "scanlog.log" For Append As 1
Print #1, Text3.Text & Text2.Text & "." & Text4.Text
Close #1

Loop
Else
Call Command4_Click
End If
End Sub

Private Sub Winsock1_Connect()
Dim strCommand As String
Dim strWebPage As String
strWebPage = Text3.Text & Text2.Text & "." & Text4.Text
strCommand = "GET " + strWebPage + " HTTP/1.0" + vbCrLf
strCommand = strCommand + "Accept: */*" + vbCrLf
strCommand = strCommand + "Accept: text/html" + vbCrLf
strCommand = strCommand + vbCrLf
Winsock1.SendData strCommand
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
MsgBox "PIE"
End Sub
[/code]

I get a 40020 runtime error "Invalid operation at current state" and Winsock1.RemoteHost = Text3.Text & cat & "." & Text4.Text highlighted in yellow. How do i fix this error?
Sign In or Register to comment.