DLL Question

 
Hello,

Although familiar with MT4 and VB6, I am having a hard time following the DLL C++ sample code.
I have a language called purebasic, which can create true DLL's that MT4 & vb6 can use.

I can pass data from MT4 out via the DLL, but I'm lost as how to pass data from the DLL back to MT4.

Could someone please explain this concept to me?

At the moment I'm working with MT4, the DLL and the custom VB6 software

Kind Regards,

Coder :)
 
1. return code
2. array passed as reference
 
Thanks Slawa,

I've got the return code working now.

How would I notify MT4 to place a trade if the signal was generated from my external program?

Does my MT4 code have to poll the DLL each tick? or is there a better way? (Like the old MT3.dll)

Kind Regards,

Coder :)
 
Does my MT4 code have to poll the DLL each tick?

It is right way because expert launched every incoming tick (there is only one event - incoming tick).