
22 Feb
2010
22 Feb
'10
9:21 p.m.
Eg wrote:
Ah... I see it now, the documentation describes the reason you need to check both:
"Note Because INVALID_SET_FILE_POINTER is a valid value for the low-order DWORD of the new file pointer, you must check both the return value of the function and the error code returned by GetLastError to determine whether or not an error has occurred. If an error has occurred, the return value of SetFilePointer is INVALID_SET_FILE_POINTER and GetLastError returns a value other than NO_ERROR. For a code example that demonstrates how to check for failure, see the Remarks section in this topic."
We need to rule out the false negative case. Wow... what a nasty API !
Nice find... I put in a ticket for it Erik