I have a dll written in CVI, I should use the functions in C#. My problem is, that in some functions there is a list (ListType) as parameter.
CVI function definition:
int DLLEXPORT InserInList(ListType listSendRequest, char *cRequest)
Code in C#:
[DllImport("DLL_Test.dll", EntryPoint = "InsertInList", CallingConvention = CallingConvention.Cdecl)]
public static extern int InsertInList(List<RequestItem> listRequest, string Request);
[DllImport("DLL_Test.dll", EntryPoint = "InsertInList", CallingConvention = CallingConvention.Cdecl)]
public static extern int InsertInList(ArrayList listRequest, string Request);
I've tried two kinds of implementation in C#. With the first one an exception will be thrown, that generic types can not be marshaled. The second option runs at least without an error through, but the list in C# stays empty. Is there any chance to pass a list as a parameter to a dll-function?
Thanks.