[RESOLVED] [2005] Getting network information using WMI
Hey.:cool:
Im trying to get information about the network usage using WMI, things such as the current download/upload speed etc.
This is easily retrieved using the PerformanceCounter but I'd rather avoid using it as it requires hardcoded category names that are language dependant (or am I wrong?).
Im still fairly new to this whole WMI thing..
Do you have any example, link or anything else that might help me? Thank you.
Re: [2005] Getting network information using WMI
Look at the Win32_NetworkAdapter class as it has a couple of properties that may be what you are looking for: Speed, Status and StatusInfo.
Re: [2005] Getting network information using WMI
unfortunately the Speed property returned the max speed of the networkadapter, not the current speed..and the status and statusinfo didnt provide what I needed.:(
Re: [2005] Getting network information using WMI
Check out the Win32_PerfFormattedData_Tcpip_NetworkInterface class. It has what you're looking for and more...
http://msdn2.microsoft.com/en-us/library/Aa394293.aspx
Re: [2005] Getting network information using WMI
Quote:
Originally Posted by stanav
Wow! Looks very promising! How did you find that class? I thought I had searched everywhere:blush: I'll try it out and post back later.
Re: [2005] Getting network information using WMI
That class provided me with all the information I could ever need:D
Problem solved.