Marshaling multidimensional array between COM and .NET

B

bogdan.maxim

I have the folowing structure defined in a C++ COM Project:

[export]
struct a
{
DOUBLE a1[6][100]; //This is the problem
DOUBLE a2[4];
DOUBLE a3;
};

I need to export it from this project to have access to it using C# or
other .NET based language. The problem is that the arrary a1 isn't
exported as a bidimensional array but as a unidimensional array, and i
cannot call any function that would accept the struct as a parameter.

Any idea how can i export the struct or to import it in .NET to see the
array as a multidimensional array?
 
?

=?ISO-8859-1?Q?Stefan_N=E4we?=

I have the folowing structure defined in a C++ COM Project:

[export]
struct a
{
DOUBLE a1[6][100]; //This is the problem
DOUBLE a2[4];
DOUBLE a3;
};

I need to export it from this project to have access to it using C# or
other .NET based language. The problem is that the arrary a1 isn't
exported as a bidimensional array but as a unidimensional array, and i
cannot call any function that would accept the struct as a parameter.

Any idea how can i export the struct or to import it in .NET to see the
array as a multidimensional array?

C++ doesn't know anything about '.NOT' or '[export]' or 'DOUBLE'.
Try a different group.

Stefan
 
S

Srini

Any idea how can i export the struct or to import it in .NET to see the
array as a multidimensional array?

Again - microsoft.public.dotnet.languages.vc is the correct group to
ask about this...

Srini
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top