6 * (C) 2002 Ximian, Inc. http://www.ximian.com
10 #ifndef __MONO_COMINTEROP_H__
11 #define __MONO_COMINTEROP_H__
13 #include <mono/metadata/method-builder.h>
14 #include <mono/metadata/method-builder-ilgen.h>
15 #include <mono/metadata/marshal.h>
18 mono_cominterop_init (void);
21 mono_cominterop_cleanup (void);
24 mono_mb_emit_cominterop_get_function_pointer (MonoMethodBuilder
*mb
, MonoMethod
* method
);
27 mono_mb_emit_cominterop_call_function_pointer (MonoMethodBuilder
*mb
, MonoMethodSignature
*sig
);
30 mono_mb_emit_cominterop_call (MonoMethodBuilder
*mb
, MonoMethodSignature
*sig
, MonoMethod
* method
);
33 mono_cominterop_emit_ptr_to_object_conv (MonoMethodBuilder
*mb
, MonoType
*type
, MonoMarshalConv conv
, MonoMarshalSpec
*mspec
);
36 mono_cominterop_emit_object_to_ptr_conv (MonoMethodBuilder
*mb
, MonoType
*type
, MonoMarshalConv conv
, MonoMarshalSpec
*mspec
);
39 mono_cominterop_get_native_wrapper (MonoMethod
*method
);
42 mono_cominterop_get_invoke (MonoMethod
*method
);
45 mono_cominterop_emit_marshal_com_interface (EmitMarshalContext
*m
, int argnum
,
47 MonoMarshalSpec
*spec
,
48 int conv_arg
, MonoType
**conv_arg_type
,
49 MarshalAction action
);
52 mono_cominterop_emit_marshal_safearray (EmitMarshalContext
*m
, int argnum
,
54 MonoMarshalSpec
*spec
,
55 int conv_arg
, MonoType
**conv_arg_type
,
56 MarshalAction action
);
58 MONO_API MONO_RT_EXTERNAL_ONLY MonoString
*
59 mono_string_from_bstr (/*mono_bstr*/gpointer bstr
);
62 mono_free_bstr (/*mono_bstr_const*/gpointer bstr
);
65 mono_class_try_get_com_object_class (void);
68 mono_cominterop_get_com_interface (MonoObject
* object
, MonoClass
* ic
, MonoError
*error
);
71 mono_cominterop_is_interface (MonoClass
* klass
);
73 #endif /* __MONO_COMINTEROP_H__ */