Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Marshaling multidimensional array between COM and .NET (http://www.velocityreviews.com/forums/t447817-marshaling-multidimensional-array-between-com-and-net.html)

bogdan.maxim@gmail.com 08-18-2005 08:52 AM

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?


=?ISO-8859-1?Q?Stefan_N=E4we?= 08-18-2005 09:49 AM

Re: Marshaling multidimensional array between COM and .NET
 
bogdan.maxim@gmail.com 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

Srini 08-18-2005 09:54 AM

Re: Marshaling multidimensional array between COM and .NET
 
> 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



All times are GMT. The time now is 08:10 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.