Robert Shearman rob@codeweavers.com writes:
AccessCheck can return TRUE but still set the last error. AccessCheck only returns FALSE if an invalid parameter is input or there is something wrong with the token being checked against. It can return TRUE but set last error if access to the object secured by the security descriptor was denied.
Yes, you have to check both the return value and the AccessStatus value, but if both succeed there's no reason to expect last error to be set. If it is really set in that case on Windows then the test needs to be fixed to reflect that fact.