How do I programmatically determine the network connection link speed for an active network connection - like Task Manager shows you in the Networking tab? I'm not really after the bandwidth available, just a figure for the current connection, e.g. 54Mbps, 100Mbps etc.
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
- What uses more memory in c++? An 2 ints or 2 funct
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
In the end I found the
Win32_PerfRawData_Tcpip_NetworkInterface
WMI class, as I need to support legacy platforms which, unfortunately, theWin32_NetworkAdapter
doesn't do.Win32_PerfRawData_Tcpip_NetworkInterface
has aCurrentBandwidth
property which gives me what I need on all required platforms (I realise I said I didn't need "bandwidth" but its acceptable and appears to return the "nominal bandwidth" of the adapter anyway).Thanks to all those who posted, pointing me in the right direction.
Win32_NetworkAdapter
WMI class can help you (Speed
property). It returns the value 54000000 for my WiFi adapter connected to a WiFi-g access point..NET way how to know adapter speed is
Some adapters are tunnels, so their speed will be returned as 0. Read NetworkInterface documentation on the MSDN for more information.