views:

113

answers:

1

I'm getting 'Invalid class name' exceptions when trying to monitor changes to the Win32_PerfFormattedData_RemoteAccess_RasPort class on Windows XP. I'm using the code listed here.

Is this class supported on XP? The documentation claims it is, although it's supplied by a different provider. If not, what's a good alternative?

+1  A: 

Win32_PerfFormattedData_RemoteAccess_RASPort formatted data class is only found on server operating systems

TStamper
And Vista. But there's definitely no XP alternative? iphlpapi.dll lies, and this class isn't available, there must be some reliable way to get usage stats on XP.
Thom
In Vista the Formatted Performance Data Provider is no longer available in the operating system, replaced with WMIPerfInst, I believe on XP that class is available but on Formatted Performance Data Provider(http://msdn.microsoft.com/en-us/library/aa390431.aspx)
TStamper
How do you go about querying the different provider? Does the XP provider support the RemoteAccess performance counters, or some alternative?
Thom
yes it provides support for the performance counter in the link
TStamper
So how do I query it with the classes available in the System.Management namespace in .NET?
Thom