[Mono-list] Unboxing values from embedded mono

Paolo Molaro lupus@ximian.com
Mon, 4 Aug 2003 12:45:50 +0200


On 08/01/03 Perry, James wrote:
> I'm embedding Mono within a certain piece of software, and I'm looking at
> extracting values out of return values (from functions called via
> mono_runtime_invoke). The writeup on embedding mono seems to indicate that
> there isn't an API to do this yet, although one is planned.

We added it a while back: use mono_object_unbox() to get a pointer
to the data:

	gint32 *int32p = mono_object_unbox (obj);
	gint32 value = *int32p;

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better