Download MetaTrader 5

Calling DLL Exports function in MT5

To add comments, please log in or register
Have you found an interesting application? Publish it in Code Base - millions of traders will appreciate that!
dr0zaxx
17
dr0zaxx 2010.07.21 08:45 

Hello,


I am trying to create a DLL which exports certain functions that can be imported and called in MT5. However, I have a problem.

Let's take the following as an example.


extern "C" __declspec(dllexport) char * PrintMessage();
#import "Sample.dll"
string PrintMessage();
#import

Is this the correct way to use char * in MT5? I tried it and it printed gibberish characters.

Please advice! Thanks!

Rashid Umarov
Admin
11812
Rashid Umarov 2010.07.21 10:10  

See String Type:

The string type is used for storing text strings. A text string is a sequence of characters in the Unicode format with the final zero at the end of it.


To add comments, please log in or register