I have an app that happily loads a dll, and then uses
something as IntPtr = GetProcAddress
...delegate ... = System.Runtime.InteropServices.Marshal.GetDelegateForFunctionPointer(...
and then obsessively calls the function that was just loaded.
Now, in Windows XP, on lots of different computers, my app runs perfectly well. But then on Windows 2000 after a few thousand calls to the function I get an error like this:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at MyApp.MyClass.MyDelegate.Invoke(...
Ideas

Windows 2000 System.AccessViolationException
ycseattle
sunny123