G
Gregory Khrapunovich
Hi,
I need to pass a structure between C++ DLL and C# client
(both ways). Among other elements the strcuture must
contain a fixed size array of integers. In C++ I can
successfully declare a structure like this:
public __gc class MyStructure
{
public:
int* __gc arr;
MyStructure(){arr = new int[10];}
~EtifConfig(){delete[] arr;}
}
But I cannot address this array in C# code, compiler
gives an error message. When I try to use __gc anywhere
in array declaration, compiler gives another error
message.
Can somebody point to an example that works?
Thank you in advance,
Gregory
I need to pass a structure between C++ DLL and C# client
(both ways). Among other elements the strcuture must
contain a fixed size array of integers. In C++ I can
successfully declare a structure like this:
public __gc class MyStructure
{
public:
int* __gc arr;
MyStructure(){arr = new int[10];}
~EtifConfig(){delete[] arr;}
}
But I cannot address this array in C# code, compiler
gives an error message. When I try to use __gc anywhere
in array declaration, compiler gives another error
message.
Can somebody point to an example that works?
Thank you in advance,
Gregory