SetPerTcpConnectionEstats

Andrew Turnbull 1 Reputation point
2020-07-27T14:25:57.127+00:00

I have been using this API function a lot on older versions of windows to collect per connection tcp statistics.

Its behaviour seems to have changed of late. Previously disabling and re-enabling statistics would reset the counters for the statistics. This does not happen any more.

Can anyone point me in the right direction for a better place to ask this question if this forum is the incorrect location.

thanks

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,422 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Andrew Turnbull 1 Reputation point
    2020-07-27T15:13:26.293+00:00

    This behavior seems to have been introduced sometime in Windows 10. I have some versions of Windows 10 that behave like this:

    1) Enable stats
    2) Collect stats
    3) Disable stats
    4) Enable stats < - at this point all extended tcp stats have returned to zero

    And some that do this

    1) Enable stats
    2) Collect stats
    3) Disable stats
    4) Enable stats <- at this point extended tcp stats counters remain as they were before step 3

    WIndows 2019 seems to follow the second pattern. Some versions of Windows 10 follow the first pattern.

    All versions of Windows prior to windows 10 that support TCP estats and that I have tested follow the first pattern.

    0 comments No comments

  2. Joy Qiao 4,886 Reputation points Microsoft Employee
    2020-07-28T07:14:44.84+00:00

    Hi,

    According to your description, seems that your issue is more related with development of Windows. Try to create a new thread in Win32 API tag, they might be more familiar with your issue.

    Win32 API subforum:
    https://learn.microsoft.com/en-us/answers/topics/winapi-general.html

    Bests,