Download MetaTrader 5

how to declare and call a function with callback function pointer as parameter imported from dll?

To add comments, please log in or register
Publish your trading signal. Gain access to millions of traders!
mt5_developer
13
mt5_developer 2014.11.14 11:16 

for example:

here is a dll named tclient.dll, which include a function below:

typedef TCLIENT_API void(*call_back)(Tick* p);

TCLIENT_API int sub_tick(CTX ctx, const char* insId, call_back f);  

 

How should I declare and call it in mql5?

#import "tclient.dll"

//how to declare function sub_tick? 

#import 

 

void save_tick()

{

//how to call function sub_tick? 

} 

 

any thoughts? thanks a lot! 

Stanislav Korotky
17928
Stanislav Korotky 2014.11.14 12:48  
mt5_developer:

any thoughts? thanks a lot! 

You can't do this in MQL.
mt5_developer
13
mt5_developer 2014.11.16 05:13  

marketeer:
You can't do this in MQL.

 

thanks! 

To add comments, please log in or register