It looks to me like locks that fail due to conflicts will set ERROR_LOCK_VIOLATION, not ERROR_ACCESS_DENIED. We should probably add some tests for the error to the LockFileEx tests.
I'd also be interested in what Windows returns on a filesystem that doesn't support locking, if such a thing exists.