TURNERMICH
Technical User
I am connecting to an FTP site. using "wininet.dll"
1.
hOpen = InternetOpen(scUserAgent, INTERNET_OPEN_TYPE_DIRECT, vbNullString, vbNullString, 0)
If hOpen = 0 Then
MsgBox ("Internet Not Connected..."
Exit Sub
End If
========This is ok==============================
2.
hConnection = InternetConnect(hOpen, TxtServer, INTERNET_INVALID_PORT_NUMBER, _
TxtUser, TxtPassWord, INTERNET_SERVICE_FTP, nFlag, 0)
If hConnection = 0 Then
MsgBox ("Error Connecting to Internet"
Exit Sub
End If
If the TxtServer is a valid ip connection, and alive., it works fine.
But... If the Ip address is invalid, or the sites ftp server is not running,
It just keeps trying to connect, and i have to ctrl/alt/del, and end task.
I have tried various samples of code using this call, and they ALL just hang. ie. the error trap does
not work.!!!!
Appreciate any help.
1.
hOpen = InternetOpen(scUserAgent, INTERNET_OPEN_TYPE_DIRECT, vbNullString, vbNullString, 0)
If hOpen = 0 Then
MsgBox ("Internet Not Connected..."
Exit Sub
End If
========This is ok==============================
2.
hConnection = InternetConnect(hOpen, TxtServer, INTERNET_INVALID_PORT_NUMBER, _
TxtUser, TxtPassWord, INTERNET_SERVICE_FTP, nFlag, 0)
If hConnection = 0 Then
MsgBox ("Error Connecting to Internet"
Exit Sub
End If
If the TxtServer is a valid ip connection, and alive., it works fine.
But... If the Ip address is invalid, or the sites ftp server is not running,
It just keeps trying to connect, and i have to ctrl/alt/del, and end task.
I have tried various samples of code using this call, and they ALL just hang. ie. the error trap does
not work.!!!!
Appreciate any help.