Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Testing for IP Connection
Message
 
 
À
02/04/2003 18:04:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00773323
Message ID:
00773728
Vues:
27
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
Fil
Voir

Click here to load this message in the networking platform