hi all.
i always have using winsock.ocx that installed by vb6 !
but currently a have to create one exe-file to send data without using winsock.ocx.
the only way i found is winsock.DLL ,but i don't understand how to use this DLL. however some samples i found in : http://www.codeguru.com/vb/vb_intern...Winsockdll.htm
but that was not working too!
i have a sample link from this address:
aheads.net/lotus/ajax.php?uname=ghasem&[email protected]&serial=12&mobile=111111
By passing each new serial to the above link , you have to receive one new password!
any solution?
thanx all.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
hi all.
i always have using winsock.ocx that installed by vb6 ! but currently a have to create one exe-file to send data without using winsock.ocx.
the only way i found is winsock.DLL ,but i don't understand how to use this DLL. however some samples i found in : http://www.codeguru.com/vb/vb_intern...Winsockdll.htm
but that was not working too!
i have a sample link from this address:
aheads.net/lotus/ajax.php?uname=ghasem&[email protected]&serial=12&mobile=111111
By passing each new serial to the above link , you have to receive one new password!
any solution?
thanx all.
Weather you use Winsock.OCX or Winsock.DLL you are still using Winsock. Winsock.OCX is a wrapper for Winsock.DLL minus some features to make it simpler to use. So, if you have to make EXE to send data without using Winsock then what kind of data are you talking about. There are APIs to send data.
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
Weather you use Winsock.OCX or Winsock.DLL you are still using Winsock. Winsock.OCX is a wrapper for Winsock.DLL minus some features to make it simpler to use. So, if you have to make EXE to send data without using Winsock then what kind of data are you talking about. There are APIs to send data.
of course you are right.
i just wanna use winsock.DLL Not OCX !
my problem is exactly about how to using winsock.dll !!!
how i should write my parameters to the URL and getting back the data as the result?
my goal is sending this parameters:
uname
mail
serial
mobile
by writing in the following URL i can send them:
and then i will have one data as the result in the winsock.ocx DataArrival procedure.
my code was this:
Code:
Private Sub Command_send__Click()
Dim strHTTP As String
If blnConnected Then Exit Sub
Dim S As String
S = "uname=" & Trim(txt_name.Text)
S = S & "&email=" & Trim(txt_email.Text)
S = S & "&serial=" & Trim(txt_serial.Text)
S = S & "&mobile=" & ""
' configure Winsock1
Winsock1.Protocol = sckTCPProtocol
Winsock1.RemoteHost = "aheads.net"
Winsock1.RemotePort = 80
'I have using GET Method
strHTTP = "GET /lotus/sock.php?" & S & " HTTP/1.0" & vbCrLf
strHTTP = strHTTP & "Host:aheads.net" & vbCrLf & vbCrLf
Winsock1.Connect
' wait for a connection
Do While Not blnConnected
DoEvents
Loop
' send the HTTP request
Winsock1.SendData strHTTP
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strResponse As String
Winsock1.GetData strResponse, vbString, bytesTotal
Dim k
k = Split(strResponse, vbCrLf)
txt_pass.Text = k(UBound(k))
End Sub
i need to remove winsock.ocx
i must use winsock.dll
Here's a sample application using the DLL. I don't know if it even works or not but it does give you a good insight into using the DLL
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.