How can I check the network connection type using the Windows API?

Posted by Jufkey on Stack Overflow See other posts from Stack Overflow or by Jufkey
Published on 2010-04-10T21:21:48Z Indexed on 2010/04/10 21:43 UTC
Read the original article Hit count: 156

Filed under:
|
|
|

How can I programmatically retrieve the current connection type (eg. LAN or Direct connection)?

InternetGetConnectedState() isn't very reliable.

For instance, I'm connected to a wireless network, but ConTypeRet is 18, which is INTERNET_CONNECTION_LAN & INTERNET_RAS_INSTALLED. Isn't there any way to make sure that ConTypeRet is either INTERNET_CONNECTION_LAN or INTERNET_CONNECTION_MODEM?

© Stack Overflow or respective owner

Related posts about c++

Related posts about c