Determining the network connection link speed

前端 未结 3 1741
借酒劲吻你
借酒劲吻你 2021-01-06 09:53

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 a

3条回答
  •  耶瑟儿~
    2021-01-06 10:53

    In the end I found the Win32_PerfRawData_Tcpip_NetworkInterface WMI class, as I need to support legacy platforms which, unfortunately, the Win32_NetworkAdapter doesn't do. Win32_PerfRawData_Tcpip_NetworkInterface has a CurrentBandwidth 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.

提交回复
热议问题