Buggish interaction between winfile_v600.mqh and PrintFormat - page 2

 
Miguel Antonio Rojas Martinez #: So I ask, how can I add FILE_ANSI or something similar in the FILE_CREATE_W or READ_FILE of Kernel32.dll??1
You don't. The “_W” mean wide, i.e., Unicode. Use the “_A” call.
 
Fab #:

Ah ah ah ah! THIS now resolves the problem!

So, finally, the problem resolves by understanding the correct datatypes to be transferred to the win32 API.

Perhaps then, for the people that could need it in the future, these are the discoveries of this exercise. And I add also the BOOL story, that is present in other posts, trying to collect information in one place:

DATATYPE CORRESPONDENCE:

Win32 API Mql5 run on 32-bit system Mql5 run on 64-bit system
HANDLE int (4 bytes) long (8 bytes)
LPSECURITY_ATTRIBUTES int (4 bytes) long (8 bytes)
LPOVERLAPPED
int (4 bytes) long (8 bytes)
 BOOL (4 bytes)  NOT bool (1 byte) BUT int 0 = false; int >0 = true

  NOT bool (1 byte) BUT int 0 = false; int >0 = true

If some expert wants to go on in filling this table it would be great. Alternatively, if anybody knows where to find such kind of information in a more professional and complete way, I think it could be useful for the whole community posting such a link in a very visible way on the forum!


Thank you a lot for your very nice support!

Man, you saved me a lot of time :-D
God bless you!