You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 7 години
1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace Security2
  4. {
  5. internal partial class Win32
  6. {
  7. const string ADVAPI32_DLL = "advapi32.dll";
  8. const string KERNEL32_DLL = "kernel32.dll";
  9. [DllImport(Win32.ADVAPI32_DLL, EntryPoint = "GetInheritanceSourceW", CharSet = CharSet.Unicode)]
  10. static extern UInt32 GetInheritanceSource(
  11. [MarshalAs(UnmanagedType.LPTStr)] string pObjectName,
  12. System.Security.AccessControl.ResourceType ObjectType,
  13. SECURITY_INFORMATION SecurityInfo,
  14. [MarshalAs(UnmanagedType.Bool)]bool Container,
  15. IntPtr pObjectClassGuids,
  16. UInt32 GuidCount,
  17. byte[] pAcl,
  18. IntPtr pfnArray,
  19. ref GENERIC_MAPPING pGenericMapping,
  20. IntPtr pInheritArray
  21. );
  22. [DllImport(Win32.ADVAPI32_DLL, EntryPoint = "FreeInheritedFromArray", CharSet = CharSet.Unicode)]
  23. static extern UInt32 FreeInheritedFromArray(
  24. IntPtr pInheritArray,
  25. UInt16 AceCnt,
  26. IntPtr pfnArray
  27. );
  28. }
  29. }