return array from dll
Posted on 2016-09-15
I created dll that have to output an array from one of functions.
In program for dll no errors shows, but when I try to use the function in another program then it is impossible.
Here the code in dll:
public static ushort GetSamplTrace(int m=16)
var arr = Array<ushort>.Empty(16)
using (BinaryReader b = new BinaryReader(File.Open(dataPath, FileMode.Open)))
pos = 29;
byte by = b.ReadBytes(2);
arr = BitConverter.ToUInt16(by, 0);
for (int i=1;i<16;i++)
arr[i] = 0;
Here I try to use it:
var arr = Array<ushort>.Empty(16);