>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 ---