ho questo nella mia dll creato in C++Array Handling tornato da C++ dll a C#
extern "C" __declspec(dllexport)
char* __stdcall hh()
{
char a[2];
a[0]='a';
a[1]='b';
return(a);
}
Ed è così che sto cercando di gestire il codice 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???
}
}
Aiuto nel procedere ulteriore.
Qual è esattamente la tua domanda? –
Voglio stampare l'array returend dal codice C++ in C# – pushE