void ListenerCallback(int msg, int p1, int p2, void* p3, void* cookie) { mController^ mlc; // unwrap the native object... if(cookie){ GCHandle h = GCHandle::FromIntPtr(IntPtr(reinterpret_cast<void*>(cookie))); try { // and cast the object back out mlc = safe_cast<mcontroller^>(h.Target); } finally { h.Free(); } } }
The runtime has encountered a fatal error. The address of the error was at 0x71de2e63, on thread 0x1474. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)