Add the SYNCHRONIZE flag to the DesiredAccess parameter when using the flags FILE_SYNCHRONOUS_IO_(NON)ALERT in NtCreateFile or NtOpenFile, even if one uses DesiredAccess == GENERIC_xxx (which should map to some FILE_GENERIC_xxx already containing the SYNCHRONIZE flag).
Indeed, it appears after extended testing that, when calling from user-mode, Windows checks the real presence of the SYNCHRONIZE flag when using FILE_SYNCHRONOUS_IO_(NON)ALERT even if we pass any of the GENERIC_xxx access flags...
Otherwise, when using FILE_GENERIC_(READ/WRITE) flags directly, there is no need to add the SYNCHRONIZE flag since it is already incorporated in it.
See CORE-7361 for more details.
svn path=/trunk/; revision=59514