0

I would like to check the internet connection(not Network) status using proxy.

I dont want to ping any urls.

For that I used IsConnectedToInternet property of NetworkListManagerClass(Interop.NETWORKLIST.dll),

IsConnectedToInternet works fine for both positive and negative scenarios.

But how I can set the proxy details to NetworkListManagerClass.

RJV
  • 55
  • 11
  • `INTERNET_CONNECTION_PROXY` in [InternetGetConnectedState](https://learn.microsoft.com/en-us/windows/win32/api/wininet/nf-wininet-internetgetconnectedstate#parameters). Please check if it is useful. – Strive Sun Apr 15 '20 at 09:39
  • INTERNET_CONNECTION_PROXY is the return value, Not the proxy value that we can set to api call. Moreover In MSDN mentioned not recommended to use this api. – RJV Apr 16 '20 at 06:46
  • Yes, the doc recommended to use the `INetworkListManager::GetConnectivity` which returns the overall connectivity state of the machine. By the way, what proxy values do you need to set? I think you can set the proxy value before using the API, and then use the API to check the internet connection. – Strive Sun Apr 17 '20 at 09:58
  • like WebReequest, these apis no mechanisms to set proxy details. – RJV Apr 18 '20 at 11:23
  • Check: [Setting WinINet Proxy Configurations in WinHTTP](https://learn.microsoft.com/en-us/windows/win32/winhttp/setting-wininet-proxy-configurations-in-winhttp) – Strive Sun Apr 21 '20 at 08:52

0 Answers0