FileFindFirst returns large negative number?

To add comments, please log in or register
Geester
280
Geester  
long searchHandle=FileFindFirst(_subFolder+"\\*",fileFirst);

Hi,

The above code is occasionally returning a large negative number like -1905372416.

This is fooling my code that tests as follows:-

if(searchHandle!=INVALID_HANDLE)

As INVALID_HANDLE equates to -1 only.

I cannot see why I would get such a large negative return value. Any ideas what this represents?

Many thanks.



Alain Verleyen
38685
Alain Verleyen  
MT4 or MT5 ? Which build ?
Geester
280
Geester  
Alain Verleyen:
MT4 or MT5 ? Which build ?

Sorry, thought I was in the MT4 forum. It's MT4, 1170 -- 20/12/2018

Alain Verleyen
38685
Alain Verleyen  
Geester:

Sorry, thought I was in the MT4 forum. It's MT4, 1170 -- 20/12/2018

Yes that's true, my fault.

Do you have any idea about "occasionally" ? Can you reproduce it in any way ? 

To add comments, please log in or register