General information
Category:
Internet applications
Steve,
Thanks for the reply. I tried your suggestion, and I get false re. checkinternetconnection even though I can access internet via IE over our LAN... see code below... Could it be a firewall issue? I cannot ping microsoft.com or weather.com from DOS prompt but I can ping a DMZ server using the full server name. What am I missing?
THIS CODE ALLOWS 1-3 URLS TO BE PASSED
*********
lparameters tcURL1, tcURL2, tcURL3
lnPcount = parameters()
llIPconn = .F.
* Check for parameters
if lnPcount = 0
=messagebox("At least one URL parameter must be passed into this program", 0, "")
return
endif
for i = 1 to lnPcount
lcURLname = "tcURL"+allt(str(i))
lcURL = &lcURLname
llIPconn = checkInternetConnection(lcURL)
if llIPconn = .T.
lnHnd = fcreate("c:\CONNECT.YES")
exit
endif
next
if llIPconn = .F.
lnHnd = fcreate("c:\CONNECT.NO")
= fclose(lnHnd)
endif
**************************************************************************************************
function checkInternetConnection
lparameters lcWebAddress
Declare Integer InternetCheckConnection in Wininet.dll String Url, Long dwFlags, Long Reserved
If InternetCheckConnection(lcWebAddress, 1, 0) != 0
return .t.
Else
return .f.
EndIf
endproc
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only