private ObjectNodeSection(string name, SectionType type, SectionAttributes attributes, string comdatName) { Name = name; Type = type; Attributes = attributes; ComdatName = comdatName; }
private ObjectNodeSection(string name, SectionType type, SectionAttributes attributes, string comdatName) { Name = name; Type = type; Attributes = attributes; ComdatName = comdatName; }
public static SectionHandle Create( SectionAccess access, SectionAttributes sectionAttributes, MemoryProtection pageAttributes, FileHandle fileHandle ) { return(Create(access, 0, sectionAttributes, pageAttributes, fileHandle)); }
public static SectionHandle Create( SectionAccess access, long maximumSize, SectionAttributes sectionAttributes, MemoryProtection pageAttributes ) { return(Create(access, null, maximumSize, sectionAttributes, pageAttributes, null)); }
public static SectionHandle Create( SectionAccess access, string name, ObjectFlags objectFlags, DirectoryHandle rootDirectory, long maximumSize, SectionAttributes sectionAttributes, MemoryProtection pageAttributes, FileHandle fileHandle ) { NtStatus status; ObjectAttributes oa = new ObjectAttributes(name, objectFlags, rootDirectory); IntPtr handle; try { if (maximumSize != 0) { if ((status = Win32.NtCreateSection( out handle, access, ref oa, ref maximumSize, pageAttributes, sectionAttributes, fileHandle ?? IntPtr.Zero )) >= NtStatus.Error) { Win32.Throw(status); } } else { if ((status = Win32.NtCreateSection( out handle, access, ref oa, IntPtr.Zero, pageAttributes, sectionAttributes, fileHandle ?? IntPtr.Zero )) >= NtStatus.Error) { Win32.Throw(status); } } } finally { oa.Dispose(); } return(new SectionHandle(handle, true)); }
public static SectionHandle Create( SectionAccess access, string name, long maximumSize, SectionAttributes sectionAttributes, MemoryProtection pageAttributes, FileHandle fileHandle ) { return(Create(access, name, 0, null, maximumSize, sectionAttributes, pageAttributes, fileHandle)); }
public Elf32Shdr(Elf32_Shdr *st) { NameOffset = st->sh_name; Type = (SectionType)st->sh_type; Flag = (SectionAttributes)st->sh_flags; Addr = st->sh_addr; Offset = st->sh_offset; Size = st->sh_size; Link = st->sh_link; Info = st->sh_info; Addralign = st->sh_addralign; Entsize = st->sh_entsize; }
private void StartBuild(Player player, Tower t, SectionMaterial m, SectionWeapon w) { GameObject block = null; GameObject weapon = null; Section topOfTower = t.GetTopSection(); GameObject playerSpot = t.towerBase.towerPoint; if(topOfTower == null) { spawnPoint.transform.position = playerSpot.transform.position; spawnPoint.transform.Translate(0,25,0); } else { Vector3 old = playerSpot.transform.position; spawnPoint.transform.position = new Vector3(old.x, topOfTower.collider.bounds.max.y, old.z); spawnPoint.transform.Translate(0,25,0); } block = Instantiate(m.GetPrefab(),spawnPoint.transform.position,Quaternion.identity) as GameObject; if(player.playerNumber == 1) { block.transform.rotation = Quaternion.AngleAxis(90, Vector3.up); } else if(player.playerNumber ==2) { block.transform.rotation = Quaternion.AngleAxis(-90, Vector3.up); } block.transform.Find("FireCam").camera.enabled = false; block.transform.Find("HitCam").camera.enabled = false; block.transform.Find("CollapseCam").camera.enabled = false; if (w.wtype != "Nothing"){ weapon = Instantiate(w.GetPrefab()) as GameObject; //I believe the here lies the issue for why building Nothing doesn't work? maybe. if(player.playerNumber == 1) { weapon.transform.rotation = Quaternion.AngleAxis(90, Vector3.up); } else if(player.playerNumber ==2) { weapon.transform.rotation = Quaternion.AngleAxis(-90, Vector3.up); } //if(weapon != null) { Vector3 localScale = weapon.transform.localScale; weapon.transform.parent = block.transform; weapon.transform.localPosition = block.transform.Find("WeaponLocation").localPosition; weapon.transform.localScale = localScale; } Section sc = block.GetComponent<Section>(); SectionAttributes s = new SectionAttributes(m, w); sc.attributes = s; player.Build(sc, t); TowerSelection.LocalSelectSection(t, sc.attributes.height); }
public override void Action() { SectionMaterial m = ValueStore.selectedMaterial; SectionWeapon w = ValueStore.selectedWeapon; if(m != null && w != null) { SectionAttributes s = new SectionAttributes(m, w); if(TurnOrder.myPlayer.GetResources() >= s.GetCost()) { //myMenu.on = false; ValueStore.helpMessage = ""; TurnOrder.SendAction(new Build(TowerSelection.GetSelectedTower().towerNum, m, w)); } else { ValueStore.helpMessage = "You don't have enough RP to do that!"; } } else { ValueStore.helpMessage = "You must select a material and a weapon type!"; } }
public static SectionAttributes section(string Clientid) { SectionAttributes sa = new SectionAttributes(); string Appsettingquery = "Select * from [cc_masterdataset].[customersettings] where [Customer_Id]=" + Clientid; DataSet ds = new DataSet(); ds = GetDataSet(Appsettingquery); if (ds.Tables[0].Rows.Count > 0) { sa.AddSection = Convert.ToBoolean(ds.Tables[0].Rows[0]["Additional_Section"].ToString()); sa.FaxSection = Convert.ToBoolean(ds.Tables[0].Rows[0]["Fax_Section"].ToString()); sa.EmailSection = Convert.ToBoolean(ds.Tables[0].Rows[0]["Email_Section"].ToString()); sa.AppType = Convert.ToInt32(ds.Tables[0].Rows[0]["Application_Type"].ToString()); } else { sa.AddSection = false; sa.FaxSection = false; sa.EmailSection = false; sa.AppType = 1; } return(sa); }
protected void Submit_Click(object sender, EventArgs e) { Get_applicantinfo(lblfileno, lblname, lblcompany, txtFileno.Text); #region section SectionAttributes sa = section(clientidbyFilenumber(txtFileno.Text)); if (!sa.AddSection) { revsec_Additional.Visible = false; } if (!sa.FaxSection) { revsec_Fax.Visible = false; fax_detail.Visible = false; } if (!sa.EmailSection) { revsec_Email.Visible = false; email_detail.Visible = false; } if (sa.AppType == 2) { senderblock.Visible = true; } else { senderblock.Visible = false; } #endregion DetailsView_Applview(DetailsView_personalinfo, DetailsView_purpose, DetailsView_payment, txtFileno.Text, hischoolgrid, univgrid, service1grid, addongrid, copychargergrid, Convert.ToInt32(ClientAdmin.Utility.clientidbyFilenumber(Session["Trackingcode"].ToString())), deliverydetails, fax_grid, fax_details, email_grid, email_details, DetailsView_Sender); Grid_applicantNotesBrowse(Grid_applicantNotes, txtFileno.Text, "Client"); Review_total_Amount(); }
internal NtSection(SafeKernelObjectHandle handle, SectionAttributes attributes, MemoryAllocationProtect protection, LargeInteger size) : base(handle) { }
/// <summary> /// Create a section object /// </summary> /// <param name="object_attributes">The object attributes</param> /// <param name="desired_access">The desired access</param> /// <param name="size">Optional size of the section</param> /// <param name="protection">The section protection</param> /// <param name="attributes">The section attributes</param> /// <param name="file">Optional backing file</param> /// <param name="extended_parameters">Extended parameters for section create.</param> /// <returns>The NT status code and object result.</returns> public static NtSection CreateEx(ObjectAttributes object_attributes, SectionAccessRights desired_access, LargeInteger size, MemoryAllocationProtect protection, SectionAttributes attributes, NtFile file, MemSectionExtendedParameter[] extended_parameters) { return(CreateEx(object_attributes, desired_access, size, protection, attributes, file, extended_parameters, true).Result); }
/// <summary> /// Create a section object /// </summary> /// <param name="object_attributes">The object attributes</param> /// <param name="desired_access">The desired access</param> /// <param name="size">Optional size of the section</param> /// <param name="protection">The section protection</param> /// <param name="attributes">The section attributes</param> /// <param name="file">Optional backing file</param> /// <param name="extended_parameters">Extended parameters for section create.</param> /// <param name="throw_on_error">True to throw an exception on error.</param> /// <returns>The NT status code and object result.</returns> public static NtResult <NtSection> CreateEx(ObjectAttributes object_attributes, SectionAccessRights desired_access, LargeInteger size, MemoryAllocationProtect protection, SectionAttributes attributes, NtFile file, MemSectionExtendedParameter[] extended_parameters, bool throw_on_error) { return(NtSystemCalls.NtCreateSectionEx(out SafeKernelObjectHandle section_handle, desired_access, object_attributes, size, protection, attributes, file.GetHandle(), extended_parameters, extended_parameters?.Length ?? 0).CreateResult(throw_on_error, () => new NtSection(section_handle))); }
/// <summary> /// Create a section object /// </summary> /// <param name="path">The path to the section</param> /// <param name="root">The root if path is relative</param> /// <param name="desired_access">The desired access</param> /// <param name="size">Optional size of the section</param> /// <param name="protection">The section protection</param> /// <param name="attributes">The section attributes. The lower 5 bits can be used to specify the NUMA node.</param> /// <param name="file">Optional backing file</param> /// <returns>The opened section</returns> /// <exception cref="NtException">Thrown on error.</exception> public static NtSection Create(string path, NtObject root, SectionAccessRights desired_access, long?size, MemoryAllocationProtect protection, SectionAttributes attributes, NtFile file) { using (ObjectAttributes obj_attr = new ObjectAttributes(path, AttributeFlags.CaseInsensitive, root)) { return(Create(obj_attr, desired_access, size.HasValue ? new LargeInteger(size.Value) : null, protection, attributes, file)); } }
public ObjectNodeSection(string name, SectionType type, SectionAttributes attributes = SectionAttributes.None) : this(name, type, attributes, null) { }
/// <summary> /// Create a section object /// </summary> /// <param name="object_attributes">The object attributes</param> /// <param name="desired_access">The desired access</param> /// <param name="size">Optional size of the section</param> /// <param name="protection">The section protection</param> /// <param name="attributes">The section attributes</param> /// <param name="file">Optional backing file</param> /// <returns>The opened section</returns> /// <exception cref="NtException">Thrown on error.</exception> public static NtSection Create(ObjectAttributes object_attributes, SectionAccessRights desired_access, long?size, ProtectionType protection, SectionAttributes attributes, NtFile file) { SafeKernelObjectHandle section_handle; NtSystemCalls.NtCreateSection(out section_handle, desired_access, object_attributes, size.HasValue ? new LargeInteger(size.Value) : null, protection, attributes, file == null ? SafeKernelObjectHandle.Null : file.Handle).ToNtException(); return(new NtSection(section_handle)); }
public static extern NtStatus NtCreateSection(out SafeKernelObjectHandle SectionHandle, SectionAccessRights DesiredAccess, [In] ObjectAttributes ObjectAttributes, [In] LargeInteger SectionSize, ProtectionType Protect, SectionAttributes Attributes, SafeHandle FileHandle);
/// <summary> /// Create a section object /// </summary> /// <param name="object_attributes">The object attributes</param> /// <param name="desired_access">The desired access</param> /// <param name="size">Optional size of the section</param> /// <param name="protection">The section protection</param> /// <param name="attributes">The section attributes. The lower 5 bits can be used to specify the NUMA node.</param> /// <param name="file">Optional backing file</param> /// <param name="throw_on_error">True to throw an exception on error.</param> /// <returns>The NT status code and object result.</returns> public static NtResult <NtSection> Create(ObjectAttributes object_attributes, SectionAccessRights desired_access, LargeInteger size, MemoryAllocationProtect protection, SectionAttributes attributes, NtFile file, bool throw_on_error) { SafeKernelObjectHandle section_handle; return(NtSystemCalls.NtCreateSection(out section_handle, desired_access, object_attributes, size, protection, attributes, file.GetHandle()).CreateResult(throw_on_error, () => new NtSection(section_handle))); }
public static ISection CreateSection <T>(T buildSection, BuildPass <T> pass) where T : struct, IConvertible { ISection returnValue = null; var buildSectionValue = (eBuildSectionEntity)(object)buildSection; switch (buildSectionValue) { case eBuildSectionEntity.UsingStatements: { returnValue = new SectionUsingStatements <T>(pass); break; } case eBuildSectionEntity.Namespace: { returnValue = new SectionNamespace <T>(pass); break; } case eBuildSectionEntity.Attributes: { returnValue = new SectionAttributes <T>(pass); break; } case eBuildSectionEntity.Class: { returnValue = new SectionClass <T>(pass); break; } case eBuildSectionEntity.Fields: { returnValue = new SectionFields <T>(pass); break; } case eBuildSectionEntity.Constructors: { returnValue = new SectionConstructors <T>(pass); break; } case eBuildSectionEntity.Properties: { returnValue = new SectionProperties <T>(pass); break; } case eBuildSectionEntity.IValidatable: { returnValue = new SectionIValidatable <T>(pass); break; } case eBuildSectionEntity.PublicMethods: { returnValue = new SectionPublicMethods <T>(pass); break; } case eBuildSectionEntity.PrivateMethods: { returnValue = new SectionPrivateMethods <T>(pass); break; } case eBuildSectionEntity.ClassClose: { returnValue = new SectionClassClose <T>(pass); break; } case eBuildSectionEntity.NamespaceClose: { returnValue = new SectionNamespaceClose <T>(pass); break; } } return(returnValue); }
public static extern NtStatus NtCreateSectionEx(out SafeKernelObjectHandle SectionHandle, SectionAccessRights DesiredAccess, [In] ObjectAttributes ObjectAttributes, [In] LargeInteger SectionSize, MemoryAllocationProtect Protect, SectionAttributes Attributes, SafeHandle FileHandle, MemSectionExtendedParameter[] ExtendedParameters, int ExtendedParameterCount);
public ObjectNodeSection(string name, SectionType type, SectionAttributes attributes = SectionAttributes.None) : this(name, type, attributes, null) { }
internal NtSection(SafeKernelObjectHandle handle, SectionAttributes attributes, ProtectionType protection, LargeInteger size) : base(handle) { }
/// <summary> /// Constructor. /// </summary> public NewNtSectionCmdlet() { Protection = MemoryAllocationProtect.ReadWrite; SectionAttributes = SectionAttributes.Commit; }
/// <summary> /// Create a section object /// </summary> /// <param name="path">The path to the section</param> /// <param name="root">The root if path is relative</param> /// <param name="desired_access">The desired access</param> /// <param name="size">Optional size of the section</param> /// <param name="protection">The section protection</param> /// <param name="attributes">The section attributes</param> /// <param name="file">Optional backing file</param> /// <returns>The opened section</returns> /// <exception cref="NtException">Thrown on error.</exception> public static NtSection Create(string path, NtObject root, SectionAccessRights desired_access, long?size, ProtectionType protection, SectionAttributes attributes, NtFile file) { using (ObjectAttributes obj_attr = new ObjectAttributes(path, AttributeFlags.CaseInsensitive, root)) { return(Create(obj_attr, desired_access, size, protection, attributes, file)); } }
/// <summary> /// Create a section object /// </summary> /// <param name="object_attributes">The object attributes</param> /// <param name="desired_access">The desired access</param> /// <param name="size">Optional size of the section</param> /// <param name="protection">The section protection</param> /// <param name="attributes">The section attributes</param> /// <param name="file">Optional backing file</param> /// <returns>The opened section</returns> /// <exception cref="NtException">Thrown on error.</exception> public static NtSection Create(ObjectAttributes object_attributes, SectionAccessRights desired_access, LargeInteger size, MemoryAllocationProtect protection, SectionAttributes attributes, NtFile file) { return(Create(object_attributes, desired_access, size, protection, attributes, file, true).Result); }