[2020-02] Fix leak in assembly-specific dllmap lookups (#21053)
[mono-project.git] / mono / metadata / cominterop.h
blobeffe379bd19f8319609b8d89d5cdab72b742b501
1 /**
2 * \file
3 * COM Interop Support
4 *
6 * (C) 2002 Ximian, Inc. http://www.ximian.com
8 */
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>
17 void
18 mono_cominterop_init (void);
20 void
21 mono_cominterop_cleanup (void);
23 void
24 mono_mb_emit_cominterop_get_function_pointer (MonoMethodBuilder *mb, MonoMethod* method);
26 void
27 mono_mb_emit_cominterop_call_function_pointer (MonoMethodBuilder *mb, MonoMethodSignature *sig);
29 void
30 mono_mb_emit_cominterop_call (MonoMethodBuilder *mb, MonoMethodSignature *sig, MonoMethod* method);
32 void
33 mono_cominterop_emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv conv, MonoMarshalSpec *mspec);
35 void
36 mono_cominterop_emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv conv, MonoMarshalSpec *mspec);
38 MonoMethod *
39 mono_cominterop_get_native_wrapper (MonoMethod *method);
41 MonoMethod *
42 mono_cominterop_get_invoke (MonoMethod *method);
44 int
45 mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum,
46 MonoType *t,
47 MonoMarshalSpec *spec,
48 int conv_arg, MonoType **conv_arg_type,
49 MarshalAction action);
51 int
52 mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum,
53 MonoType *t,
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);
61 MONO_API void
62 mono_free_bstr (/*mono_bstr_const*/gpointer bstr);
64 MonoClass*
65 mono_class_try_get_com_object_class (void);
67 void*
68 mono_cominterop_get_com_interface (MonoObject* object, MonoClass* ic, MonoError *error);
70 gboolean
71 mono_cominterop_is_interface (MonoClass* klass);
73 #endif /* __MONO_COMINTEROP_H__ */