Re: Performance monitoring: strange error in .Net 2.0



On Thu, 05 Jan 2006 16:18:46 +0100, Lucvdv <replace_name@xxxxxxxx> wrote:

> There seems to be a strange interaction/conflict between
> System.Diagnostics.PerformanceCounter objects and
> System.Security.Principal.WindowsIdentity.Impersonate() in CLR 2.0, that
> didn't exist in 1.1.
<snip>


It's working through a workaround in my app now, but it still looks like a
bug in CLR 2.0 to me.

My workaround is starting a separate thread before logging on to the other
account. That thread creates the performance objects, reads the counter
values at regular intervals, and sends them to the main code (form) through
Invoke.
.



Relevant Pages

  • Re: Parameter destruction
    ... I "solved" by passing the parameter using const& instead of by value, but that is just a workaround for what I believe *IS a ... Unexpected destruction of a parameter passed by value??? ... The reason it wasn't fixed before and is not available as a QFE for 7.0 or 7.1 is that fixing this required fundamental changes in the way the CLR handles interop: we needed an exact way to specify what the right copy constructer and destructor for a type passed by value across an interop boundary is since the CLR internally needs to call it). ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Brackets in C#
    ... // some other long-running code ... In this case you won't help the CLR in any way. ... could collect the Foo - Instance very earlier. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Argh! MS Office
    ... In article, Chris Ridd ... If you mentally replace CLR with JVM, that gives you an idea of the ... Have you looked at the CLR? ...
    (uk.comp.sys.mac)
  • Re: Does project load DLL multiple times?
    ... | I thought it was only for avoiding dynamic compilation. ... Here is a snip from the MSDN Magazine article talking about NGEN ... native images are loaded by the CLR just like any other DLL. ...
    (microsoft.public.dotnet.languages.csharp)