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 wrote that CMemMapFile::Open returns an error code or 0 when there is no error.
At the beginning of the conversation I posted a screenshot of what CMemMapFile::Open function returns.
it was 0 as if there was no error.
Then I corrected it to see if the handle is NULL.
and as a result I got
2016.03.04 19:00:00.897 BuyNow Client v 1.03 USDCHF.m,M5: BuyNow Client v 1.03.mq4, handle=8589934592
There is no error, there is a handle, what else do you need, you may say... but no one created the file display... And it's impossible to open a mapping that hasn't been created.
Or maybe this mapping was created by someone else and I don't know about it????
Some programme creates a display with this exact name :-)
Dmitry Luck'janenko:
Or maybe this mapping was created by someone else and I don't know about it ???.
Some programme creates a mapping with that exact name :-)
Well, you have created something yourself before that )
the software just works with memory like that. It doesn't clear anything at once. That's why old data can hang around and be opened.
But when it overwrites, it won't open. You probably didn't do anything between openings.
Excellent library, used it together with mutexes to write a local copier
As an important component for the receiver I got the file size and built a loop from it,
I found a few bugs - ArrayOutOfRange or lack of 4 bytes.
Fixed
If I create MMF through MQL5 and write to it and then read it.
But if I create MMF with another programme, when I try to write or read from it, a critical error occurs.
What is the problem?
If I create MMF through MQL5 and write to it and then read it.
But if I create MMF with another programme, when I try to write or read from it, a critical error occurs.
What is the problem?
The club of telepaths is trying hard to guess the number of the critical error.
The club of telepaths is tensely trying to guess the number of the critical error.
MT5 critical error message without error code. If there was a code, it would be indicated.
But if I created MMF with another programme, when I try to write or read from it, a critical error occurs.
What is the problem?
- check if there are no errors when opening the file
- check the available allocated volume for reading/writing in all functions of working with arrays/strings (take into account 2 bytes)
etc.
Problem solved.
It is necessary to write and read MMF files by a third-party application starting from 4 bytes, not from 0.
And for MT5 4 bytes are not counted, even if the offset is 0.
So when I had a third-party programme writing from 0 byte, an error occurred when I tried to read MT5.
Problem solved.
It is necessary to write and read MMF files by a third-party application starting from 4 bytes, not from 0.
And for MT5 4 bytes are not counted, even if the offset is 0.
That's why when I had a third-party programme writing from 0 byte, when I tried to read MT5, an error occurred.