FileOpen()

 
While testing and attempting to open an unexisting file, experts log yields correct message "invalid handle -1 in FileSize" but GetLastError() returns 4051 using Build 220.
 

Call GetLastError() before perfroming the operation you think is a problem to clear out any old error.

...

...

int error;

... other code

error = GetLastError(); // clears error history

FileOpen(...)

error = GetLastError(); // now, there is either no error, or it contains the error that corresponds to the file operation.

Reason: