views:

45

answers:

1

I have an unmanaged application that uses a managed library. One of the calls the managed component makes is to the PerformanceCounterCategory class. It looks like every time any methods are accessed (for example, PerformanceCounterCategory.Exists(String)), the CLR crashes pretty hard - exceptions are not catchable, and even the debugger detaches without any errors. I get the following message in the Event Viewer:

"The description for Event ID 0 from source .NET Runtime cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer."

"CorperfmonExt!CollectCtrs caught exception c00000fd"

I've looked at some of the possible solutions (most suggest a corrupt registry is to blame), but none work. If I make the same call in a simple .net 4 application, everything works fine, so I'm fairly certain the system settings are intact. This same code worked just fine before .net 4.

Any insight is appreciated.

Edit: I should add that the unmanaged application is running as a service.

A: 

It turned out that the issue was related to VCL:

http://groups.google.com/group/microsoft.public.dotnet.framework.interop/browse_thread/thread/f764f9342057d78f/8bc221247a3fd79d

Following the steps described by the author has fixed the problem

Melllvar