Hi Jialiang,
Not sure this tool handle my situation properly
One example, I have unmanaged function whih expects array of structs to be passed void Func1(SOME_STRUCT[] st, int p);
The tool converts it to
[System.Runtime.InteropServices.DllImportAttribute("<Unknown>", EntryPoint="Func1")]
public static extern int Func1(ref SOME_STRUCT st, int p);
But I cannot pass Array of structures to this function from the C# code now, since once i declare
SOME_STRUCT[] in_st = new SOME_STRUCT(5);
and then fill it with data, I will receive comipler's error (which I'd tested:
Error2The best overloaded method match for Func1(ref SOME_STRUCT, int); has some invalid arguments)
Still looking for help! Please,let mw know what data is needed to clarify the situation.
I dont think that it is possible to pass array of struct in this case.