I try to import functions from my C-Dll. A function has a struct array as a parameter. The struct will be filled in the function.
struct test
{
int test1;
int test2;
};
void FillStruct( struct test stTest[], int size)
{
if(size == 2){
stTest[0].test1 = 5;
stTest[0].test2 = 5;
stTest[1].test1 = 2;
stTest[1].test2 = 2;
}
}
The method FillStruct should be used in C#.
I think I have to create the struct in C#. Must I marshal the struct if I use memcpy in the Fillstruct?