[Mono-bugs] [Bug 67039][Nor] Changed - [PATCH] Delegates returned from a PInvoke call are improperly marshalled

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 29 Sep 2004 01:20:31 -0400 (EDT)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by grompf@sublimeintervention.com.


--- shadow/67039	2004-09-29 01:18:10.000000000 -0400
+++ shadow/67039.tmp.454	2004-09-29 01:20:31.000000000 -0400
@@ -48,6 +48,29 @@
 ------- Additional Comments From grompf@sublimeintervention.com  2004-09-29 01:18 -------
 Created an attachment (id=11493)
 updated patch
+------- Additional Comments From grompf@sublimeintervention.com  2004-09-29 01:20 -------
+  the 3rd patch doesn't search the finalizer ghash, but implements its own that adds a 
+delegate ot the hash as it gets marshalled down, and removes it when the delegate gets 
+  Additionally it brings the exception for a delegate created in native land into line with 
+Unhandled Exception: System.ArgumentException: Additional information: Function 
+pointer was not created by a delegate.
+in (unmanaged) (wrapper managed-to-native) System.Object:
+__icall_wrapper_mono_ftn_to_delegate (intptr,intptr)
+  The only place this might not be perfect yet is the handling of the delegates in the hash; 
+when marshalling the delegate_trampoline back to a delegate, should we clone the object; 
+or keep things how we are by just pointing the MonoObject/MonoDelegate to the same