Marshaling multidimensional array between COM and .NET



 DEVELOP > c-Plus-Plus > Marshaling multidimensional array between COM and .NET

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: ""
Date: 18 Aug 2005 03:52:32 AM
Object: Marshaling multidimensional array between COM and .NET
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?
.

User: "=?ISO-8859-1?Q?Stefan_N=E4we?="

Title: Re: Marshaling multidimensional array between COM and .NET 18 Aug 2005 04:49:57 AM
wrote:

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
.
User: "Srini"

Title: Re: Marshaling multidimensional array between COM and .NET 18 Aug 2005 04:54:23 AM

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
.



  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER