How to get sent/received bytes count by network adapter in C++/WinAPI?
My programming platform is Windows.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Look into the function
GetTcpStatisticsand related ones (GetUdpStatisticsetc.).On second thought: performance counters would probably provide another method that is more tailored to your needs. This can also be queried via WMI (
Win32_PerfFormattedData_Tcpip_NetworkInterface).