Information générale
Catégorie:
Applications Internet
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement