Dmitry Timoshkov : kernel32: Set last error to ERROR_ALREADY_EXISTS if CreateFile succeeds and file existed before for CREATE_ALWAYS and OPEN_ALWAYS .