Download MetaTrader 5
To add comments, please log in or register
Have you published a program in the Market? Place it in your blog as well - the widget will help!
Doerk Hilger
1073
Doerk Hilger 2016.05.04 06:37 

Hey there, 

this code crashes the EA with the message: Access violation write to 0x00000020 in '(...)EA.ex4'. WTF?

string filename=NULL;
string search="*";
long handle=FileFindFirst(search,filename,FILE_COMMON);

while (handle!=INVALID_HANDLE)
      {
      handle=FileFindNext(handle,filename);
      }
FileFindClose(handle);   

When FileFindNext() is executed 3rd time, the debugger stops. It happens with every search mask. I cannot trace the problem. 

Of course I reported this to the service desk, but my last answer there is 3 months ago. Senseless in most cases. Maybe someone had the same problem and has an idea. 

Thanks in advance

Doerk 

Doerk Hilger
1073
Doerk Hilger 2016.05.04 06:48  
My fault. FileFindNext() returns bool.
/
To add comments, please log in or register