+ return itf;
+}
+
+/**
+ * cominterop_get_interface:
+ * @obj: managed wrapper object containing COM object
+ * @ic: interface type to retrieve for COM object
+ *
+ * Returns: the COM interface requested
+ */
+static gpointer
+cominterop_get_interface (MonoComObject *obj, MonoClass *ic, gboolean throw_exception)
+{
+ MonoError error;
+ gpointer itf = cominterop_get_interface_checked (obj, ic, &error);
+ if (!is_ok (&error)) {
+ if (throw_exception) {
+ mono_error_set_pending_exception (&error);
+ return NULL;
+ } else {
+ mono_error_cleanup (&error);
+ }
+ }
+