Download MetaTrader 5

How to import ReadFile (from kernel32.dll) into my expert

To add comments, please log in or register
Antonino Amorosia
35
Antonino Amorosia  

Hello to all.

Before the release of new MT4 build 600, I was able to import some system function (kernel32.dll) to read/write file out of sandbox, using WinFiles.mhq library found in this community.

With new build I had to update the library to use unicode version of this function library, everything works perfectly, apart the ReadFile function.

This function need a pointer buffer where store readed data from file. The buffer that i make is a string variable that is passed as reference using MulDiv( ) function (to obtain the pointer).

This string is initialized with a size of 260 character, all "0" .

When i call ReadFile(), I do not receive any error, the file is opened correctly, but if i read from files 20 character, the function return 20 character, but these are only "0" value, that is the initializzation value of my buffer.

Any idea? i'm wandering in the darkness.... :(

Thank's all!

qjol
3243
qjol  
Antonino Amorosia
35
Antonino Amorosia  
Thanks!!!!
To add comments, please log in or register