Marshaling multidimensional array between COM and .NET

Discussion in 'C++' started by bogdan.maxim@gmail.com, Aug 18, 2005.

  1. Guest

    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?
    , Aug 18, 2005
    #1
    1. Advertising

  2. 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
    =?ISO-8859-1?Q?Stefan_N=E4we?=, Aug 18, 2005
    #2
    1. Advertising

  3. Srini Guest

    > 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
    Srini, Aug 18, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kannan
    Replies:
    0
    Views:
    549
    Kannan
    Mar 11, 2005
  2. isthar

    Marshaling unicode WDDX

    isthar, Jan 5, 2006, in forum: Python
    Replies:
    4
    Views:
    327
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Jan 10, 2006
  3. Sree

    Namevaluecollection Vs Webservices(Marshaling)

    Sree, Sep 27, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    132
  4. Tien Pham via .NET 247

    problems with intptr indexing and marshaling data

    Tien Pham via .NET 247, Mar 30, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    151
    Tien Pham via .NET 247
    Mar 30, 2005
  5. John Lam
    Replies:
    9
    Views:
    178
    Tadashi Saito
    Mar 31, 2006
Loading...

Share This Page