Hi,
I am a newbie in this forum.
I want to use VC++ to develop a dll and integrate it in C#
I searched internet and get some information from MSDN.
But I still don't know how to return a string array from dll to C#.
Like this:
in C++:
extern "C" __declspec(dllexport) int myFunc(char *** varTemp)
{
*varTemp = new char*[10];
for(int i = 0; i < 10; i ++)
{
(*varTemp)[ i ] = new char[20];
::strcpy((*varTemp)[ i ], "My Test");
}
return 10;
}
in C#
[DllImport("MyDLL.dll", EntryPoint="myFunc")]
public static extern int myFunc(....);
What shall I use to replace "...."
Thx
Visual C#8
|