Sending nested structs to C# DLL

 

Hi,

To make the code a bit more structed I was thinking of passing a stuck within a struct to C# DLL, not that I had to include such complexity. But it is not working. 

Is it even possible to send such structures to DLL?

MQL

struct bar
  {
   double            open;
   double            high;
   double            low;
   double            close;
   datetime          date;
  };
  
  struct pointer {
      double value;
      bar bar;
  };

#import "ExpertAdvisorSwing.dll"
bool IsBuy(pointer &pointers[], int size);
#import

Best Regards,

Hendrik

 

Please post in the correct section. This has obviously nothing to do with a "Trading system".

And search before posting, this question has already been asked and answered several times.

 
Topic moved to General.
 

Thank you for moving it to the relevant topic.

I did search, but could not find an answer to my particular question.

I could find plenty of examples for sending one tier struct, but I have a nested struct. For that I could not find any answers.

 
Looks like I had some incorrect references in DLL part. So nothing special needed when having nested structs
 
lastpunisher #:
Looks like I had some incorrect references in DLL part. So nothing special needed when having nested structs

Can you please post an example on how how you could pass struct between C# and MQL5? Thanks