The AreAnyAccessesGranted function tests whether any of a set of requested access rights has been granted. The access rights are represented as bit flags in a 32-bit access mask.
BOOL AreAnyAccessesGranted(
DWORD GrantedAccess, // access mask for granted access rights
DWORD DesiredAccess // access mask for access rights requested
);
If any of the requested access rights have been granted, the return value is nonzero.
If none of the requested access rights have been granted, the return value is zero.
The AreAnyAccessesGranted function is often used by a server application to check the access rights of a client attempting to gain access to an object. When any of the bits set in the DesiredAccess parameter match the bits set in the GrantedAccess parameter, at least one of the requested access rights has been granted.
Windows NT: Requires version 3.1 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winbase.h.
Import Library: Use advapi32.lib.
Client/Server Access Control Overview, Client/Server Access Control Functions, AccessCheck, AreAllAccessesGranted, MapGenericMask