long fileHandle
Mikhail Dovbakh:
long fileHandle
long fileHandle
Changing fileHandle to long doesn't seem to fix the problem.
The culprit turned out to be in the declaration of last argument which is supposed to be declared as long:
bool ReadFile (int fileHandle,char& buffer[],int bytes,int& numOfBytes,long overlapped);
ReadFile function (Windows)
- msdn.microsoft.com
Reads data from the specified file or input/output (I/O) device. Reads occur at the position specified by the file pointer if supported by the device. This function is designed for both synchronous and asynchronous operations. For a similar function designed solely for asynchronous operation, see ReadFileEx. Syntax Parameters hFile [in] A...

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I tried to run the attached simple script in 64bit MT5, but for some reason ReadFile() results in an ugly crash. All other functions imported from kernel32 work fine.
This code also works without problems in MT4 and 32bit MT5.
Any idea what's wrong?