By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,017 Members | 1,011 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,017 IT Pros & Developers. It's quick & easy.

How to pass System.Array of object to Unmanaged code?

P: 3
Hi all,
I am stucked with a problem. I have to paas a System.Array of object to my unmanaged C code as a void*

I have a class of 'PointZ' which stores x, y,z coordinate and have some methods.I created an System.Array of million of points which contain these point information. I control the size of array on runtime while storing the data into it.

in c# here is my array declaration--
public static System.Array pointRecordsArray = System.Array.CreateInstance(typeof(PointZ), 0); //stores all data points

here is my function in C--pntArray is the point array i have to pass

__declspec(dllimport) process_Delaunay_Debug(void* pntArray,int** pntIdArray,float* ptLL,float* ptUR,long pntArraySize,int pntRecLen);


Please suggest a way to paas pointRecordsArray to C function..
Thanks in advance for any help...

vipin
Dec 27 '07 #1
Share this Question
Share on Google+
1 Reply


P: 3
Hi, Can anyone help me on above issue...
Jan 9 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.