I am trying to pass a byte array (image data) from C/Obj-C to managed
using mono_runtime_invoke. I can get a hold of the MonoMethod which
has a byte[] as a parameter and I can call the method but when I try
to use the byte[] in any way on the C# end I get an instant crash.
Are there any examples out there of sending a byte[] or any other
pointers on pulling this off?
NSData *data = [NSData dataWithContentsOfFile:[[NSBundle mainBundle]
pathForResource:@"someImage.png" ofType:nil]];
int size = data.length;
void *arg[2] = { (void*)data.bytes, &size };
mono_runtime_invoke( method, NULL, args, NULL );
My managed method signature is like this:
public static void testBytes( byte[] input, int length )
Mike
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list