Export (0) Print
Expand All
Expand Minimize

AreAnyAccessesGranted function

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 an access mask.

Syntax


BOOL WINAPI AreAnyAccessesGranted(
  _In_  DWORD GrantedAccess,
  _In_  DWORD DesiredAccess
);

Parameters

GrantedAccess [in]

Specifies the granted access mask.

DesiredAccess [in]

Specifies the access mask to be requested. This mask must have been mapped from generic to specific and standard access rights, usually by calling the MapGenericMask function.

Return value

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.

Remarks

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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winbase.h (include Windows.h)

Library

Advapi32.lib

DLL

Advapi32.dll

See also

Client/Server Access Control Overview
Client/Server Access Control Functions
AccessCheck
AreAllAccessesGranted
MapGenericMask

 

 

Community Additions

ADD
Show:
© 2014 Microsoft