[Mono-bugs] [Bug 74882][Blo] New - Function pointer to delegate conversion should be implemented in emit_ptr_to_object_conv

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 9 May 2005 09:02:25 -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 kornelpal@hotmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74882

--- shadow/74882	2005-05-09 09:02:25.000000000 -0400
+++ shadow/74882.tmp.5011	2005-05-09 09:02:25.000000000 -0400
@@ -0,0 +1,46 @@
+Bug#: 74882
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: Windows XP SP2; Mono 1.1.7; .NET Framework 1.1 SP1
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: interop
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: kornelpal@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Function pointer to delegate conversion should be implemented in emit_ptr_to_object_conv
+
+Mono does not implement function pointer to Delegate marshaling.
+
+marshal.c, emit_ptr_to_object_conv:
+case MONO_MARSHAL_CONV_DEL_FTN: {
+	/* fixme: we never convert functions back to delegates, dont 
+	// know if thats the correct behaviour
+	*/
+	break;
+}
+
+Function pointers should be converted back to delegates. .NET Framework 
+does it as well.
+
+I am working on a COM interface interop custom marshaler for 
+GdipLoadImageFromStream and 
+GdipSaveImageToStream that require an IStream interface.
+
+This is required to suuport loading images from and saving images to 
+streams on Win32.
+
+Without function pointer to delegate marshaling COM interface to managed 
+object conversion cannot be implemented.
+
+This conversion is required if we want to implement COM interface 
+marshaling natively.
+
+Sincerely,
+Kornél