5

I'm using Delphi XE2.

I want to know, is it possible to check if the current connection is metered or not?

I just looked in the Registry, where I found the DefaultMediaCost, but when I toggle the connection to metered nothing changed in this list.

So now I want to check the current state of my connection in the program itself, but I don't know if there is any way to do this.

The only function I found is for C# (NetworkInformation.GetInternetConnectionProfile).

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Hunt3r
  • 51
  • 2
  • 1
    Found an [example](https://github.com/microsoft/Windows-classic-samples/blob/master/Samples/ConnectionManagerCost/cpp/Wcmcostsample.cpp#L12) for C++. It uses WinAPI functions ([WcmQueryProperty](https://learn.microsoft.com/en-us/windows/win32/api/wcmapi/nf-wcmapi-wcmqueryproperty) and others), so code can be rewritten to Delphi. – zed Mar 16 '20 at 20:04

0 Answers0