GetSecurityInfo

[DllImport("Advapi32.dll", SetLastError = true)]
public static extern uint GetSecurityInfo(
   IntPtr handle,
   SE_OBJECT_TYPE ObjectType,
   SECURITY_INFORMATION SecurityInfo,
   out IntPtr pSidOwner,
   out IntPtr pSidGroup,
   out IntPtr pDacl,
   out IntPtr pSacl,
   out IntPtr pSecurityDescriptor
);

Microsoft documentation: Link

Last updated