コード例 #1
0
        /// <nodoc />
        public static bool FindFileAccessPolicyInTree(
            byte[] recordBytes,
            string absolutePath,
            UIntPtr absolutePathLength,
            out uint conePolicy,
            out uint nodePolicy,
            out uint pathId,
            out IO.Windows.Usn expectedUsn)
        {
            Assert64Process();

            GCHandle pinnedRecordArray = GCHandle.Alloc(recordBytes, GCHandleType.Pinned);

            try
            {
                IntPtr record = pinnedRecordArray.AddrOfPinnedObject();
                return(ExternFindFileAccessPolicyInTree(
                           record,
                           absolutePath,
                           absolutePathLength,
                           out conePolicy,
                           out nodePolicy,
                           out pathId,
                           out expectedUsn));
            }
            finally
            {
                pinnedRecordArray.Free();
            }
        }
コード例 #2
0
 private static extern bool ExternFindFileAccessPolicyInTree(
     IntPtr record,
     [MarshalAs(UnmanagedType.LPWStr)] string absolutePath,
     UIntPtr absolutePathLength,
     out uint conePolicy,
     out uint nodePolicy,
     out uint pathId,
     out IO.Windows.Usn expectedUsn);