Ich habe dies in meiner dll in C++ erstelltHandhabung Array zurückgegeben von C++ dll C#
extern "C" __declspec(dllexport)
char* __stdcall hh()
{
char a[2];
a[0]='a';
a[1]='b';
return(a);
}
Und das ist, wie ich versuche, Code in C#
[DllImport(@"mydll.dll",CharSet = CharSet.Ansi,CallingConvention = CallingConvention.StdCall)]
public static extern IntPtr hh();
static void Main(string[] args)
{
IntPtr a = hh();
//How to proceed here???
}
}
Hilfe in Verfahren zu handhaben des Weiteren.
Was genau ist Ihre Frage? –
Ich möchte das Array returend aus C++ Code in C# – pushE