System.IO.MemoryMappedFiles.MemoryMappedFile.GetSecAttrs C# (CSharp) Méthode

GetSecAttrs() private méthode

private GetSecAttrs ( HandleInheritability inheritability ) : Interop.Kernel32.SECURITY_ATTRIBUTES
inheritability HandleInheritability
Résultat Interop.Kernel32.SECURITY_ATTRIBUTES
        private unsafe static Interop.Kernel32.SECURITY_ATTRIBUTES GetSecAttrs(HandleInheritability inheritability)
        {
            Interop.Kernel32.SECURITY_ATTRIBUTES secAttrs = default(Interop.Kernel32.SECURITY_ATTRIBUTES);
            if ((inheritability & HandleInheritability.Inheritable) != 0)
            {
                secAttrs = new Interop.Kernel32.SECURITY_ATTRIBUTES();
                secAttrs.nLength = (uint)sizeof(Interop.Kernel32.SECURITY_ATTRIBUTES);
                secAttrs.bInheritHandle = Interop.BOOL.TRUE;
            }
            return secAttrs;
        }