krnl386.exe: Fix last error check for DOS compatibility hack.

Alexandre Julliard julliard at
Thu Jul 29 12:58:56 CDT 2010

Andrew Nguyen <anguyen at> writes:

> Hmm, is there any situation where CreateFile yields a last error of
> ERROR_WRITE_PROTECT? If an application requests GENERIC_WRITE access
> on a file residing on a read-only file system, CreateFile on NT
> platforms seems to always set the last error to ERROR_ACCESS_DENIED

That depends on the error mapping, but there may well be cases where we
want to do that, if not today then at some point in the future. There
shouldn't be any harm in keeping the current check.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list