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
The notorious casting of structures is swearing. Keep the corrected version in the attachment.
Prompt! Thank you very much!
Now I've looked at your error carefully - the same situation with structure casting, but in another container - CDictionary. Replace Include\Dictionary.mqh with the variant attached below.
And yes, everything works fine under MT4 and I will say more CZip is a workhorse in my projects on MT4.
What is left is this:
'm_array' - structures containing objects are not allowed Dictionary.mqh 306 25
What's left is this:
'm_array' - structures containing objects are not allowed Dictionary.mqh 306 25
Line 306 should be replaced with this fragment:
In the attache Dictionary for MT4
Line 306 should be replaced with this fragment:
In the attache Dictionary for MT4.
That makes sense. Super thanks.
PS. It's true that for zero-length files in the archive an incorrect header is created (in the example ZipTask1), because of which they are unretrievable, but this can be sorted out - maybe it's something in the test itself.
Makes sense. Super thanks.
PS. It's true that for zero-length files in the archive an invalid header is created (in the ZipTask1 example), which makes them unretrievable, but this can be sorted out - maybe it's something in the test itself.
I'll see what I can do with zero length.
Here's what's wrong? I can't uncompress the zip.zip file (downloaded from the example).
Log.
18:25:47.809 Script zip_arc101 GBPUSD,H1: loaded successfully
0 18:25:47.830 zip_arc101 GBPUSD,H1: initialised
0 18:25:47.830 zip_arc101 GBPUSD,H1: Handle= 1 GetLastError= 0
0 18:25:47.830 zip_arc101 GBPUSD,H1: FileReadArray= 11004
0 18:25:47.830 zip_arc101 GBPUSD,H1: Zip.CreateFromCharArray= true
0 18:25:47.830 zip_arc101 GBPUSD,H1: Archive successfully loaded. Total files: 7
0 18:25:47.836 zip_arc101 GBPUSD,H1: Zip.UnpackZipArchive= false
0 18:25:47.837 zip_arc101 GBPUSD,H1: Zip.UnpackZipArchive= false
0 18:25:47.837 zip_arc101 GBPUSD,H1: Zip.UnpackZipArchive= false
0 18:25:47.837 zip_arc101 GBPUSD,H1: uninit reason 0
0 18:25:47.839 Script zip_arc101 GBPUSD,H1: removed
The CZip::UnpackZipArchive method always returns false for some reason, although it does its job. This is a bug. Check actual unpacking by field observations.
The CZip::UnpackZipArchive method always returns false for some reason, although it does its job. This is a bug. Check the actual unpacking by observation.
Yes. false but unpacking works!
Here is another problem, if I need to unpack several archives in a loop, changing only the year in the name.
Only d2014.zip is unpacked and that's it.
0 01:57:36.772 Script zip_arc104 GBPUSD,H1: loaded successfully
0 01:57:36.807 zip_arc104 GBPUSD,H1: initialised
0 01:57:36.807 zip_arc104 GBPUSD,H1: -------------- DD\d2014.zip
0 01:57:36.815 zip_arc104 GBPUSD,H1: DD\d2014.zip Zip.LoadZipFromFile= true
0 01:57:36.815 zip_arc104 GBPUSD,H1: Archive successfully loaded. Total files: 1
0 01:57:36.906 zip_arc104 GBPUSD,H1: Zip.UnpackZipArchive= false
0 01:57:36.906 zip_arc104 GBPUSD,H1: -------------- DD\d2015.zip
0 01:57:36.912 zip_arc104 GBPUSD,H1: DD\d2015.zip Zip.LoadZipFromFile= true
0 01:57:36.912 zip_arc104 GBPUSD,H1: Archive successfully loaded. Total files: 1
1 01:57:36.912 zip_arc104 GBPUSD,H1: invalid pointer access in 'Zip.mqh' (407,28)
0 01:57:36.913 zip_arc104 GBPUSD,H1: uninit reason 0
0 01:57:36.915 Script zip_arc104 GBPUSD,H1: removed