Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Check DUN status
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00146676
Message ID:
00147382
Vues:
30
>DECLARE SHORT InternetGetConnectedState IN WININet.DLL ;
> INTEGER @lpdwFlags, ;
> INTEGER dwReserved
>nFlags = 0
>nResult = InternetGetConnectedState(@nFlags, 0)

Since you posted the code I played with it a little...

Here's what the problem is:

I have a dial-up connection, but I got it marked as a LAN connection, because
essentially it's always on.

The problem is if I disconnect, the above returns I'm still connected even
though I'm not.

I also question the whole validity of chekcing for dialup connections
for Internet usage. The only reliable way to know whether you're connected
is to try to access something on the net and have it complete or fail.
You can be connected, but your router can be hosed and you won't get
nowhere. The only safe way is to ask the user if you really need to
know - or fail gracefully if you can get there and *then* ask to connect.

Just my 2 cents.

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform