[advapi32/tests #2] Don't set last error to 0 so we can check if it has changed

Alexandre Julliard julliard at winehq.org
Mon Feb 18 14:09:36 CST 2008

Robert Shearman <rob at 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.

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list