System.IO.FileStream.GetSecAttrs C# (CSharp) Method

GetSecAttrs() private static method

private static GetSecAttrs ( FileShare share ) : Interop.Kernel32.SECURITY_ATTRIBUTES
share FileShare
return Interop.Kernel32.SECURITY_ATTRIBUTES
        private unsafe static Interop.Kernel32.SECURITY_ATTRIBUTES GetSecAttrs(FileShare share)
        {
            Interop.Kernel32.SECURITY_ATTRIBUTES secAttrs = default(Interop.Kernel32.SECURITY_ATTRIBUTES);
            if ((share & FileShare.Inheritable) != 0)
            {
                secAttrs = new Interop.Kernel32.SECURITY_ATTRIBUTES();
                secAttrs.nLength = (uint)sizeof(Interop.Kernel32.SECURITY_ATTRIBUTES);

                secAttrs.bInheritHandle = Interop.BOOL.TRUE;
            }
            return secAttrs;
        }