Tim
Tim

Reputation: 394

Programmatically get network statistics for a selected adapter

I am trying to find a way to programmatically get the network statistics for a specific adapter in Windows 10. I found that GetIpStatistics() function, but it returns statistics for all adapters. Does anyone know of a function that gets the same type of statistics but only for a specific adapter?

Upvotes: 1

Views: 423

Answers (1)

Remy Lebeau
Remy Lebeau

Reputation: 595339

You can use GetIfTable() or GetIfTable2(), and then look for the desired interface in the returned table.

Or, if you already know the LUID/index of the desired interface, you can use GetIfEntry2() or GetIfEntry2Ex() instead.

Upvotes: 2

Related Questions