Hello,
Looking the source code of mtguru1.dll I'have found that gFileRead() function should not work. Am I Wrong ?
gFileRead() uses a local variable to store the string read from the file. When the function returns, it returns a pointer to that variable, but this pointer can be a valid one because the local variable pbuffer goes out of scope.
So, from a MQL4 EA, an instruction like this should crash :
string buffer = gFileRead( handle, 50 );
and if it works it's strange ...
P.S.: I've posted this in the wrong thread, before.
Create your own MetaTrader extension (dll).