In my app I'm using InternetGetConnectedState
to determine if the system is online.
I was using Windows 10
and it was always working fine.
Recently I've upgraded my machine to Windows 11
and found that it's not working anymore: it's returning TRUE
always.
In its lpdwFlags
parameter it returns 18, which means LAN (0x2) | RasInstalled (0x10)
.
I think this is a regression and it's related to Ras (I connect using Dial-up).
Two questions:
- Is it really a bug, or me misusing this function in some way?
- Is there a known workaround for my config?
As InternetGetConnectedState recommends,
There is a Microsoft sample NetworkListManager which is uploaded recently.