-
InternetGetConnectedStateEx returning incorrect information
Using the WinInet library to determine whether or not the user has an active
connection to the internet and how they connect. When I use InternetGetConnectedStateEx
however it basically lies to me. Tested on a machine with no connection established
whatsoever. The function returned back and told me that not only was I connected
but I was connected over a LAN..the machine is a stand-alone, has no connection
to the network.
Has anyone found a reliable way to determine if an internet connection exists
and if not to establish one. Or is my only option to use this poorly documented
library that just doesn't seem to work properly.
-
Re: InternetGetConnectedStateEx returning incorrect information
Hi David --
> Using the WinInet library to determine whether or not the user has an active
> connection to the internet and how they connect. When I use
InternetGetConnectedStateEx
> however it basically lies to me. Tested on a machine with no connection established
> whatsoever. The function returned back and told me that not only was I connected
> but I was connected over a LAN..the machine is a stand-alone, has no connection
> to the network.
>
> Has anyone found a reliable way to determine if an internet connection exists
> and if not to establish one. Or is my only option to use this poorly documented
> library that just doesn't seem to work properly.
Yeah, basically wininet just tells you what the registry tells it. The only way to
really know is to look for something you're relatively sure should be there. See the
NetConnect.zip sample at http://www.mvps.org/vb for my hack.
Later... Karl
--
[Microsoft Basic: 1976-2001, RIP]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks