Download MetaTrader 5
To add comments, please log in or register
Ask your broker to open the official channel. Thousands of traders will read the news!
Vitezslav Halfar
9
Vitezslav Halfar 2014.03.12 02:15 

Hi,

I'm pointing to a bug with string (unicode) transmission into .DLL

#import "..."
   bool protocol_Auth(string,string);
#import

First example doesn't work good.

class protocol
        {
        ...
        public:
                bool Auth(string _user,string _pass);
        };

bool protocol::Auth(string _user, string _pass)
        {
        return(protocol_Auth(_user,_pass)); 
        //-> library accept 2 string parameters everytime as _user and _user (as the first)
        //-> library debug = _user,_user - WRONG
        }

Second example works fine. (It's also called in protocol::Auth)

protocol_Auth("USER","PASS"); //-> library accept 2 string parameters as "USER" and "PASS" - library debug = "USER","PASS" - OK
qjol
3243
qjol 2014.03.12 04:49  
micclly
186
micclly 2014.03.12 16:06  

The mentioned in this topic might not be unicode/ansi string problem.

I've heard same problem as this topic in Twitter. "The second string argument is same as the first at the DLL side"

So, I think more reproduction codes are worth, and should be submitted to MetaQuotes.

micclly
186
micclly 2014.03.16 12:59  

I've created code to reproduce this bug. Code is on GitHub.

From my tests,

  • With build 610
  • Result is incorrect if run a script from MT4 Terminal
  • Result is correct if run a script from MetaEditor debugger
  • With build 616
  • Results are correct if run a script from both MT4 Terminal and MetaEditor debugger.
So, try the latest (but not the offical) release build 616.
/
To add comments, please log in or register