chsvlib
chsv helper source code

◆ CheckFileAccess() [2/2]

BOOL Chusov::Win32::Security::CheckFileAccess ( LPCWSTR  lpszFileName,
DWORD  dwAccessMask 
)

Checks if a current user's access to a file, which is specified by its name, is allowed by security attributes of the file.

Parameters
[in]lpszFileNameis a name of the file, which access is checked against.
dwAccessMaskis a standard access mask specifying a type of the access requested. The value is composed of Windows API constants, and it may file specific access control values, standard access control values, generic access control values or any combination of thereof.
Returns
The function returns TRUE, if the requested access is allowed, or FALSE otherwise.
Exceptions
Chusov::Exceptions::ChsvCodeExceptionA system-level error occurred.