diff --git a/Forms/ProcessMemoryViewForm.Designer.cs b/Forms/ProcessMemoryViewForm.Designer.cs index 114dfcf4..ad90bf60 100644 --- a/Forms/ProcessMemoryViewForm.Designer.cs +++ b/Forms/ProcessMemoryViewForm.Designer.cs @@ -37,14 +37,13 @@ private void InitializeComponent() this.createClassAtAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.regionsGroupBox = new System.Windows.Forms.GroupBox(); this.sectionsDataGridView = new System.Windows.Forms.DataGridView(); + this.bannerBox1 = new ReClassNET.UI.BannerBox(); this.addressColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.sizeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.nameColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.protectionColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.stateColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.typeColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.moduleColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.bannerBox1 = new ReClassNET.UI.BannerBox(); this.contextMenuStrip.SuspendLayout(); this.regionsGroupBox.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.sectionsDataGridView)).BeginInit(); @@ -109,7 +108,6 @@ private void InitializeComponent() this.sizeColumn, this.nameColumn, this.protectionColumn, - this.stateColumn, this.typeColumn, this.moduleColumn}); this.sectionsDataGridView.Location = new System.Drawing.Point(6, 19); @@ -124,6 +122,17 @@ private void InitializeComponent() this.sectionsDataGridView.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.sectionsDataGridView_CellMouseDoubleClick); this.sectionsDataGridView.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.sectionsDataGridView_CellMouseDown); // + // bannerBox1 + // + this.bannerBox1.Dock = System.Windows.Forms.DockStyle.Top; + this.bannerBox1.Icon = global::ReClassNET.Properties.Resources.B32x32_Magnifier; + this.bannerBox1.Location = new System.Drawing.Point(0, 0); + this.bannerBox1.Name = "bannerBox1"; + this.bannerBox1.Size = new System.Drawing.Size(834, 48); + this.bannerBox1.TabIndex = 2; + this.bannerBox1.Text = "View all memory regions mapped in the process."; + this.bannerBox1.Title = "Memory Viewer"; + // // addressColumn // this.addressColumn.DataPropertyName = "address"; @@ -163,15 +172,6 @@ private void InitializeComponent() this.protectionColumn.ReadOnly = true; this.protectionColumn.Width = 80; // - // stateColumn - // - this.stateColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; - this.stateColumn.DataPropertyName = "state"; - this.stateColumn.HeaderText = "State"; - this.stateColumn.Name = "stateColumn"; - this.stateColumn.ReadOnly = true; - this.stateColumn.Width = 57; - // // typeColumn // this.typeColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; @@ -189,17 +189,6 @@ private void InitializeComponent() this.moduleColumn.Name = "moduleColumn"; this.moduleColumn.ReadOnly = true; // - // bannerBox1 - // - this.bannerBox1.Dock = System.Windows.Forms.DockStyle.Top; - this.bannerBox1.Icon = global::ReClassNET.Properties.Resources.B32x32_Magnifier; - this.bannerBox1.Location = new System.Drawing.Point(0, 0); - this.bannerBox1.Name = "bannerBox1"; - this.bannerBox1.Size = new System.Drawing.Size(834, 48); - this.bannerBox1.TabIndex = 2; - this.bannerBox1.Text = "View all memory regions mapped in the process."; - this.bannerBox1.Title = "Memory Viewer"; - // // ProcessMemoryViewer // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -222,18 +211,17 @@ private void InitializeComponent() #endregion private System.Windows.Forms.DataGridView sectionsDataGridView; - private System.Windows.Forms.DataGridViewTextBoxColumn addressColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn sizeColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn nameColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn protectionColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn stateColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn typeColumn; - private System.Windows.Forms.DataGridViewTextBoxColumn moduleColumn; private System.Windows.Forms.GroupBox regionsGroupBox; private System.Windows.Forms.ContextMenuStrip contextMenuStrip; private System.Windows.Forms.ToolStripMenuItem setCurrentClassAddressToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripMenuItem createClassAtAddressToolStripMenuItem; private UI.BannerBox bannerBox1; + private System.Windows.Forms.DataGridViewTextBoxColumn addressColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn sizeColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn nameColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn protectionColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn typeColumn; + private System.Windows.Forms.DataGridViewTextBoxColumn moduleColumn; } } \ No newline at end of file diff --git a/Forms/ProcessMemoryViewForm.cs b/Forms/ProcessMemoryViewForm.cs index 5cd54d9e..24ca0bad 100644 --- a/Forms/ProcessMemoryViewForm.cs +++ b/Forms/ProcessMemoryViewForm.cs @@ -30,22 +30,22 @@ public ProcessMemoryViewer(RemoteProcess process, ClassNodeView classesView) if (process.IsValid) { DataTable dt = new DataTable(); - dt.Columns.Add("address", typeof(long)); - dt.Columns.Add("size", typeof(long)); + dt.Columns.Add("address", typeof(string)); + dt.Columns.Add("address_val", typeof(IntPtr)); + dt.Columns.Add("size", typeof(ulong)); dt.Columns.Add("name", typeof(string)); dt.Columns.Add("protection", typeof(string)); - dt.Columns.Add("state", typeof(string)); dt.Columns.Add("type", typeof(string)); dt.Columns.Add("module", typeof(string)); process.NativeHelper.EnumerateRemoteSectionsAndModules(process.Process.Handle, delegate (IntPtr baseAddress, IntPtr regionSize, string name, NativeMethods.StateEnum state, NativeMethods.AllocationProtectEnum protection, NativeMethods.TypeEnum type, string modulePath) { var row = dt.NewRow(); - row["address"] = baseAddress.ToInt64(); - row["size"] = regionSize.ToInt64(); + row["address"] = baseAddress.ToString("X"); + row["address_val"] = baseAddress; + row["size"] = (ulong)regionSize.ToInt64(); row["name"] = name; row["protection"] = protection.ToString(); - row["state"] = state.ToString(); row["type"] = type.ToString(); row["module"] = Path.GetFileName(modulePath); dt.Rows.Add(row); @@ -122,7 +122,7 @@ private IntPtr GetSelectedRegionAddress() var row = sectionsDataGridView.SelectedRows.Cast().FirstOrDefault()?.DataBoundItem as DataRowView; if (row != null) { - return (IntPtr)(long)row["address"]; + return (IntPtr)row["address_val"]; } return IntPtr.Zero; } diff --git a/Forms/ProcessMemoryViewForm.resx b/Forms/ProcessMemoryViewForm.resx index 7c975f22..63396554 100644 --- a/Forms/ProcessMemoryViewForm.resx +++ b/Forms/ProcessMemoryViewForm.resx @@ -132,9 +132,6 @@ True - - True - True