[Mono-dev] MonoType trouble when adjusting method signature

Zoltan Varga vargaz at gmail.com
Sat Jul 8 10:58:25 EDT 2006


                             Hi,

  Make a copy of klass->byval_arg, set the 'byref' flag, and the OUT
flag in the copy.

                       Zoltan

On 7/7/06, Jonathan S. Chambers <Jonathan.Chambers at ansys.com> wrote:
> I have to do some adjustments to the method signatures of the native function calls for COM Interop. In most cases, the return type of a managed method on a RCW is really the last parameter of the COM method call. For example:
>
> C#
> double GetDouble();
>
> C++/COM
> int GetDouble(double* val); // the int return value is the standard HRESULT
>
> In adjusting the signature I have a MonoType* (double in this case) which is the  return type. I need to get the corresponding byref version of that MonoType, and apply the PARAM_ATTRIBUTE_OUT attribute to that type's attributes in order to use it as a parameter in the unmanaged method signature. Any advice on how to do this? There is a dup_type method in class.c, but it seems like I'm missing something.
>
> Thanks,
> Jon
>
> _______________________________________________
> 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