Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking Internet Connectivity
Message
De
27/08/2004 13:55:03
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00936372
Message ID:
00937117
Vues:
14
Nice,

More correct would be http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/internetattemptconnect.asp
declare integer InternetAttemptConnect in wininet.dll integer

Connected = empty(InternetAttemptConnect(0))
>How about:
>
DECLARE INTEGER InternetAttemptConnect IN WinInet.dll STRING
>if InternetAttemptConnect("")<1
>   * You're connected!
>endif
>
>
>>Nice code, let's save a couple of lines:
>>
>>
>>FUNCTION CheckInternetConnection
>>LPARAMETERS tcWebAddress
>>DECLARE Integer InternetCheckConnection;
>> IN WININET.DLL;
>> String Url, Long dwFlags, Long Reserved
>> RETURN (InternetCheckConnection(tcWebAddress,1,0)<>0)
>>ENDFUNC
>>
>>
>>
>>>How does one check for Internet Connectivity from within a Visual FoxPro 8 Application. - Some sample code would be most helpful.
>>>>
>>
>>>Hello Mahmud
>>
>>>Here is one:
>>
>>? CheckInternetConnection('http://www.microsoft.com')
>>
>>FUNCTION CheckInternetConnection
>>LPARAMETERS tcWebAddress
>>DECLARE Integer InternetCheckConnection;
>> IN WININET.DLL;
>> String Url, Long dwFlags, Long Reserved
>>IF InternetCheckConnection(tcWebAddress,1,0)<>0
>>   RETURN .T.
>>ELSE
>>   RETURN .F.
>>ENDIF
>>
>>>Hope this helps
>>
>>>Claudio
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform