Importing DLL / struct - documentation is incomplete

 
https://www.mql5.com/en/docs/runtime/imports

I want to refer to the import of structs.

Structs can be passed by reference. In the import section you define like
void MyFunc( mystruct &data ); 
And within C# you define the param as IntPtr. 
public static void MyFunc( IntPtr data ) 
Then simply use Marshal.PtrToStructure to cooy the content to the identical struct in C#. 

Make sure the struct is simple: no strings, no objects, fixed arrays and of course that in C# it has the same fields and size. 

You also dont need to convert to uchar-array first. Just pass it as described. 

Documentation on MQL5: MQL5 programs / Call of Imported Functions
Documentation on MQL5: MQL5 programs / Call of Imported Functions
  • www.mql5.com
To import functions during the execution of a mql5-program, the client terminal uses early binding. This means that if a program has call of an...