COM Interop and Array Pointers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    COM Interop and Array Pointers

    I am using a COM DLL function that takes a pointer to the first
    element in an array of short values.

    Foo(short* array)

    COM interop provides that function to me in the .NET world with a "ref
    short" parameter.

    Foo(ref short array)

    It seems that no matter what I try, the function only sees the first
    element in the array. Is there a way to get it to see then entire
    array? Maybe by using some sort of marshalling I haven't tried yet?

    Thanks,
    Mike
Working...