Performance counters

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
 
M

Mike Lundell

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top