PerformanceCounter Problem
C#
1
Posts
1
Posters
0
Views
1
Watching
-
I need to show the network performance just like Windows Task Manager’s Network Utilization. I am using PerformanceCounter class. It is working fine until I deploy my application on any other machine. My code goes like : this.performanceCounter.CategoryName = "Network Interface"; this.performanceCounter.CounterName = "Current Bandwidth"; //Following line breaks this.performanceCounter.InstanceName = "Realtek RTL8139 Family PCI Fast Ethernet NIC - Virtual Machine Network Services Driver"; The problem is that the VS.NET 2003 hardcodes PerformanceCounter.InterfaceName in my application. I want to get this ethernet driver name at runtime. How do I do it? Zishan