/// <summary> /// Create a new section view attribute. /// </summary> /// <param name="flags">Specify the flags for the data view attribute.</param> /// <param name="view_size">The section view size.</param> /// <param name="throw_on_error">True to throw on error.</param> /// <returns>The section view attribute.</returns> public NtResult <SafeAlpcDataViewBuffer> CreateSectionView(AlpcDataViewAttrFlags flags, long view_size, bool throw_on_error) { AlpcDataViewAttr attr = new AlpcDataViewAttr() { SectionHandle = Handle.DangerousGetHandle().ToInt64(), ViewSize = new IntPtr(view_size) }; return(NtSystemCalls.NtAlpcCreateSectionView(Handle.Port.Handle, 0, ref attr).CreateResult(throw_on_error, () => new SafeAlpcDataViewBuffer(attr.ViewBase, view_size, Handle, flags, true))); }