jshumaker: Is there any chance that MQL4 is not releasing the file lock
or anything I can do to confirm that the file lock is released?
- No.
How To Ask Questions The Smart Way. 2004
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken. -
The lock has been released when you can open it with the C#.
- You have a race condition; you have no coordination between MT4 and C#. The simplest solution is to write the file with a ".TMP" extension, close it, then rename it so C# can see it and open it;.
William Roeder:
- No.
How To Ask Questions The Smart Way. 2004
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken. -
The lock has been released when you can open it with the C#.
- You have a race condition; you have no coordination between MT4 and C#. The simplest solution is to write the file with a ".TMP" extension, close it, then rename it so C# can see it and open it;.
I didn't think about renaming the file. Thank you
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 have a simple MQL4 program that creates a simple one line text file for each minute with the datetime/open/high/low/close values. I then have a C# program that copies the output file from MQL4 to a network directory so that a secure/isolated pc can process the values in a database. At the end of my MQL4 code I do close the file handle but yet I still occasionally get a file lock error from the C# program. Is there any chance that MQL4 is not releasing the file lock or anything I can do to confirm that the file lock is released?