I am using com library of c++ dll in c#.
Here is my c++ function which is in DLL.
STDMETHODIMP StdObj::Operation(VARIANT* Param1, VARIANT* Param2, LONG* Param3)
{
//Implementation code…..
}
Here is my code which is written in c#
Using LibraryLib;
using System.Runtime.InteropServices;
class Program
{
static void Main(string[] args)
{
List<String> First = new List<String>(3);
First.Add("10/7/2014");
First.Add("29/6/2015");
First.Add("10/8/2016");
List<Double> Second = new List<Double>(3);
Second.Add(-10000);
Second.Add(25000);
Second.Add(50000);
int Third;
LibraryLib.TestObj _Obj1 = new LibraryLib.TestObj();
_Obj1.BusinessObject(First.ToArray(), Second.ToArray(), out Third);
}
}
}
While running code I am getting this error
Additional information: Memory is locked. (Exception from HRESULT: 0x8002000D (DISP_E_ARRAYISLOCKED))