I have function in C
void GetCharArray(char* arrayNew[5])
{
arrayNew[5]= {"Test",
"Test2",
"Test4",
"Test5",
"Test6",
};
}
extern "C" __declspec(dllexport) void GetCharArray(char* arrayNew[5]);
Want to call it from my C# code as following
[DllImport(@"Test.dll",
CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Auto)]
public static extern void GetCharArray(String[] sbOut);
List<string> testList = new List<string>();
GetCharArray(testList .ToArray());
I want my testList to be populated by values from C code.Am I marshaling it in right way.As when the debugger is reaching GetCharArray() function it is showing no entry point found. Kindly Help.
char[,]array from your C code?