Problem with Filedelete - page 2

 

4099 is from other code. Only check GetLastError if the previous function returns an error.

FileDelete returns void so you have to GetLastError to clear it, FileDelete, GetLastError to get the real one.

 

yes, i think thats it..

it seems like the errorcode comes for the fileread-function, but

my function is allmost a copy of the mql4 reference - filedelete sample...

is that code wrong ?? there they work with GetLastError(), too...

EDIT:

sorry, my failure.. now i understand...

a call of GetLastError() clears the old error and another call after FileDelete() brings the right errorcode

Thanks for your help !!

 
Maybe u should re installed it ..