Re: how to use winsock.DLL
Quote:
Originally Posted by
pernia
How is it not working ? Did it crash ? Did it do nothing ? What's wrong with it ?
Re: how to use winsock.DLL
Moved From The CodeBank (which is for sharing code rather than posting questions :) )
Re: how to use winsock.DLL
Quote:
Originally Posted by
pernia
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.
Re: how to use winsock.DLL
Quote:
Originally Posted by
jmsrickland
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:
aheads.net/lotus/ajax.php?uname=ghasem&[email protected]&serial=12&mobile=111111
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
I'm ready to learn.
thanx
1 Attachment(s)
Re: how to 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