views:

75

answers:

1

Hi guys

I have a Winform application (C#) which imports some functions from dll.

Sometimes when running the application i get the following exception:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I catch it in AppDomain.CurrentDomain.UnhandledException.

But i see no stack. How do i get a stack?

Thanks.

A: 

This exception occurs outside of the scope of your program in the interop plumbing of the CLR, and can only be captured by attaching an external debugger to the process. I suggest using WinDbg (debugging tools for windows).

-Oisin

x0n
will try that, thanks!