[Mono-dev] [PATCH] patches that allow calling mono_init_com_types from native using ICall's.

Kornél Pál kornelpal at gmail.com
Mon Jan 5 19:36:56 EST 2009


Please implement initialization in unmanaged native code for 
GetIUnknownForObject and QueryInterface rather than exposing a private 
method that has to be called. COM interop should be compatible with 
MS.NET and this is a bug that should be fixed rather than worked around 
by exposing and externally calling an internal initialization function.



Tom Hindle wrote:
> Hi,
> Attached are two patches that allow calling mono_init_com_types using
> the function mono_init_com_types() is usually called automatically when
> needed by the following internal functions in marshal.c
> emit_ptr_to_object_conv,
> emit_object_to_ptr_conv,
> emit_struct_conv,
> emit_marshal_com_interface,
> emit_marshal_variant,
> cominterop_get_native_wrapper,
> However in none of these functions have run it not possible to call
> functions like GetIUnknownForObjectInternal and QueryInterfaceInternal
> via ICALL.
> If this approach isn't acceptable would it be possible to add explicit
> calls to mono_init_com_types info methods like
> GetIUnknownForObjectInternal and QueryInterfaceInternal?
> Thanks
> Tom Hindle
> ------------------------------------------------------------------------
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

More information about the Mono-devel-list mailing list