View | Details | Raw Unified | Return to bug 465825
Collapse All | Expand All

(-)mono.orig/mono/metadata/marshal.c (-1 / +22 lines)
Lines 12043-12055 Link Here
12043
	m->csig = csig;
12043
	m->csig = csig;
12044
}
12044
}
12045
12045
12046
static void
12047
cominterop_fix_param_num(MonoMethodSignature *sig, MonoMarshalSpec **mspecs)
12048
{
12049
	// Fix index of SizeParamIndex parameter. Because we pass a pointer to the interface as
12050
	// first parameter the offset of the parameter specified by SizeParamIndex is off by one.
12051
	int i;
12052
12053
	for (i = 1; i < sig->param_count; i ++) {
12054
		MonoType *t = sig->params [i];
12055
12056
		switch (t->type) {
12057
		case MONO_TYPE_SZARRAY:
12058
			mspecs [i+1]->data.array_data.param_num++;
12059
			break;
12060
		default:
12061
			break;
12062
		}
12063
	}
12064
}
12065
12046
/**
12066
/**
12047
 * cominterop_get_ccw:
12067
 * cominterop_get_ccw:
12048
 * @object: a pointer to the object
12068
 * @object: a pointer to the object
12049
 * @itf: interface type needed
12069
 * @itf: interface type needed
12050
 *
12070
 *
12051
 * Returns: a value indicating if the object is a
12071
 * Returns: a value indicating if the object is a
12052
 * Runtime Callable Wrapper (RCW) for a COM object
12072
 * COM Callable Wrapper (CCW) for a COM object
12053
 */
12073
 */
12054
static gpointer
12074
static gpointer
12055
cominterop_get_ccw (MonoObject* object, MonoClass* itf)
12075
cominterop_get_ccw (MonoObject* object, MonoClass* itf)
Lines 12201-12206 Link Here
12201
					}
12221
					}
12202
				}
12222
				}
12203
			}
12223
			}
12224
			cominterop_fix_param_num(sig_adjusted, mspecs);
12204
12225
12205
			/* first arg is IntPtr for interface */
12226
			/* first arg is IntPtr for interface */
12206
			mspecs [1] = NULL;
12227
			mspecs [1] = NULL;

Return to bug 465825