[Mono-list] Re: p/invoke and arrays

Robert Jordan robertj at gmx.net
Wed Mar 1 18:25:36 EST 2006


Michael Wild wrote:
> hi
> 
> i'm just entering the lands of p/invoke and have been reading some 
> tutorials. however, what i couldn't find, is how to pass arrays to 
> c-functions which take a pointer to the first element in contiguous 
> memory (like: void fun( int *a );, or: void fun( int a[] ); ).
> 
> any help or pointer to some doc would be welcome!

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconmarshalingdatawithplatforminvoke.asp

See "Marshaling Arrays of Types".

Robert



More information about the Mono-list mailing list