06-03-2014 04:18 PM
Calling GetFileAttrs on a file that does not exist is considered an error -- a non-existent file is considered an invalid input. Using this function to detect whether the file/dir exists is kind of a "creative use" of the function.
SetBreakOnLibraryErrors just turns on/off error popups and suspension ("breaking") for whenever any library function returns an error. Whether or not you call SetBreakOnLibraryErrors(0) first, your call to GetFileAttrs still returns an error. Calling SetBreakOnLibraryErrors(0) just turns the notification off.
You should remember to call SetBreakOnLibraryErrors again afterwards to turn it back on (assuming it was on in the first place).
06-03-2014 04:34 PM