public static void DebugGetCallstack(out Int32[] callstackAbsolute, out Int32[] callstackRelative) { callstackAbsolute = new Int32[1024]; callstackRelative = new Int32[1024]; GCHandle hAbsolute = GCHandle.Alloc(callstackAbsolute, GCHandleType.Pinned); GCHandle hRelative = GCHandle.Alloc(callstackRelative, GCHandleType.Pinned); try { InteropEmu.DebugGetCallstackWrapper(hAbsolute.AddrOfPinnedObject(), hRelative.AddrOfPinnedObject()); } finally { hAbsolute.Free(); hRelative.Free(); } }