private static int GetAttributeListSize(int count)
        {
            IntPtr size = IntPtr.Zero;

            Win32NativeMethods.InitializeProcThreadAttributeList(IntPtr.Zero, count, 0, ref size);
            return(size.ToInt32());
        }
        public SafeProcThreadAttributeListBuffer(int count) : base(GetAttributeListSize(count))
        {
            IntPtr size = new IntPtr(Length);

            if (!Win32NativeMethods.InitializeProcThreadAttributeList(handle, count, 0, ref size))
            {
                throw new SafeWin32Exception();
            }
        }