Hi there,
I'm trying to use function GetNamedSecurityInfo() to read the ACL of a folder structure.
The code looks like this:
dwError := GetNamedSecurityInfo(pAnsiChar(Filename), SE_FILE_OBJECT, DACL_SECURITY_INFORMATION, nil, nil, @ExistingDacl, nil, @psd);
Unfortunately the compiler complains:
D:\workspace\Libs\MyFileUtils.pas(54,70) Error: Incompatible type for arg no. 2: Got "SE_OBJECT_TYPE", expected "_SE_OBJECT_TYPE"
If I try to change to _SE_FILE_OBJECT, I get the following error message:
D:\workspace\Libs\MyFileUtils.pas(54,71) Error: Identifier not found "_SE_FILE_OBJECT"
Strange is, that the function is defined in JwaAclApi as:
function GetNamedSecurityInfo(pObjectName: LPTSTR; ObjectType: SE_OBJECT_TYPE;
SecurityInfo: SECURITY_INFORMATION; ppsidOwner, ppsidGroup: PPSID; ppDacl,
ppSacl: PPACL; var ppSecurityDescriptor: PSECURITY_DESCRIPTOR): DWORD; stdcall;
So, from my point of view SE_FILE_OBJECT should be fine??
Has anyone a solution for this problem?
TIA,
Chris