Performance counters

  • Thread starter Thread starter Colin Findlay
  • Start date Start date
C

Colin Findlay

Hi,

I've got an application that executes
System.Diagnostics.Process.GetProcessesByName(name)

This can potentially throw InvalidOperationException if performance
counters for the process object are not enabled.
Is there a way to check if a specific performance counter is enabled
before I make this call?

Regards
Colin
 
Just setup exception handling on the method (for whatever exception it is)
and if you don't want to print the error goto next process or whatever.


considering you're working with process's and understand that it's throwing
exceptions you've probably already considered that option and are looking
to solve the whole thing altogether.

That, i don't know much about.. sorry.

Mike
 
Back
Top