Merge pull request #3734 from kumpera/monoclass_reorg
[mono.git] / mono / metadata / cominterop.c
index bedd740079bfdc160e07c76ae65b67134f7af777..39a808dc8b2b4761c0a80add4c2c9855dc90d270 100644 (file)
 #include <string.h>
 #include <errno.h>
 
+#if defined(HOST_WIN32)
+#include <oleauto.h>
+#endif
+
 /*
 Code shared between the DISABLE_COM and !DISABLE_COM
 */
@@ -1502,7 +1506,7 @@ ves_icall_System_Runtime_InteropServices_Marshal_ReleaseInternal (gpointer pUnk)
 
 static gboolean cominterop_can_support_dispatch (MonoClass* klass)
 {
-       if (!(klass->flags & TYPE_ATTRIBUTE_PUBLIC) )
+       if (!(mono_class_get_flags (klass) & TYPE_ATTRIBUTE_PUBLIC) )
                return FALSE;
 
        if (!cominterop_com_visible (klass))