Hello...
If you write short* array is not actually... is a pointer to a memory zone
where is some information (it may be the start of an array).. so don't think
that this is an array...
To call that method correctly, you'll have to marshal the C# array to
unmanaged and send the size of the array.
So you'll have something like this...
//C++
void Foo(short* pArray, unsigned int size){...};
//C#
[DllImport("MyDll.dll")]
public static extern Foo(ref IntPtr arrayPointer, uint size);
To create arrayPointer you'll have to allocate some memory...
short[] myArray;
//init and set array elements
IntPtr arrayPointer = Marshal.AlloHGlobal(myArray.Length *
Marshal.SizeOf(typeof(short));
Marshal.Copy(myArray, 0, arrayPointer, myArray.Length);
//invoke method...
Foo(arrayPointer, myArray.Length);
Hope this helps...