A working .NET example using SetEntriesInAcl interop in action
问题 Does anyone has a working example of invoking SetEntriesInAcl method in .NET using P/Invoke? I keep getting error 87 when invoking it and just cannot get what am I doing wrong. Here are my definitions: private enum FileAccessRights { FILE_READ_DATA = 0x0001, } private enum AccessMode { GRANT_ACCESS = 1, REVOKE_ACCESS = 4, } private enum InheritanceFlags { NO_INHERITANCE = 0x0, } private enum TrusteeForm { TRUSTEE_IS_SID = 0, } private enum TrusteeType { TRUSTEE_IS_USER = 1, } private struct