How to get the statistical data on network data usage for various applications through code, such as C++

lijia zhan 0 Reputation points
2024-01-02T09:24:08.99+00:00

Hi, there

How to get the statistical data on network data usage for various applications through code, such as C++,similar to the screenshot

User's image

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-01-04T02:33:20.6533333+00:00

    Hello,

    You may try ***GetExtendedTcpTable ***function (iphlpapi.h) combined with GetPerTcpConnectionEStats or GetPerTcp6ConnectionEStats.

    Detail information about the usage you may reference iphlpapi.h header:

    https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/

    Above are suggestions for your reference. More questions about the dev or code, we would recommend you post on specific dev forum.

    Best Regards,
    Karlie Weng


    If the Answer is helpful, please click "Accept Answer" and upvote it.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.