internal void FromStruct(AlpcDataViewAttr attr) { Flags = attr.Flags; SectionHandle = attr.SectionHandle.Value; ViewBase = attr.ViewBase.ToInt64(); ViewSize = attr.ViewSize.ToInt64(); }
/// <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))); }
public static extern NtStatus NtAlpcCreateSectionView( SafeKernelObjectHandle PortHandle, AlpcCreateSectionViewFlags Flags, ref AlpcDataViewAttr ViewAttributes );