Skip to content

Commit fd23a62

Browse files
committed
Fixed address display.
1 parent e6ecf63 commit fd23a62

File tree

3 files changed

+25
-40
lines changed

3 files changed

+25
-40
lines changed

Forms/ProcessMemoryViewForm.Designer.cs

+18-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Forms/ProcessMemoryViewForm.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@ public ProcessMemoryViewer(RemoteProcess process, ClassNodeView classesView)
3030
if (process.IsValid)
3131
{
3232
DataTable dt = new DataTable();
33-
dt.Columns.Add("address", typeof(long));
34-
dt.Columns.Add("size", typeof(long));
33+
dt.Columns.Add("address", typeof(string));
34+
dt.Columns.Add("address_val", typeof(IntPtr));
35+
dt.Columns.Add("size", typeof(ulong));
3536
dt.Columns.Add("name", typeof(string));
3637
dt.Columns.Add("protection", typeof(string));
37-
dt.Columns.Add("state", typeof(string));
3838
dt.Columns.Add("type", typeof(string));
3939
dt.Columns.Add("module", typeof(string));
4040

4141
process.NativeHelper.EnumerateRemoteSectionsAndModules(process.Process.Handle, delegate (IntPtr baseAddress, IntPtr regionSize, string name, NativeMethods.StateEnum state, NativeMethods.AllocationProtectEnum protection, NativeMethods.TypeEnum type, string modulePath)
4242
{
4343
var row = dt.NewRow();
44-
row["address"] = baseAddress.ToInt64();
45-
row["size"] = regionSize.ToInt64();
44+
row["address"] = baseAddress.ToString("X");
45+
row["address_val"] = baseAddress;
46+
row["size"] = (ulong)regionSize.ToInt64();
4647
row["name"] = name;
4748
row["protection"] = protection.ToString();
48-
row["state"] = state.ToString();
4949
row["type"] = type.ToString();
5050
row["module"] = Path.GetFileName(modulePath);
5151
dt.Rows.Add(row);
@@ -122,7 +122,7 @@ private IntPtr GetSelectedRegionAddress()
122122
var row = sectionsDataGridView.SelectedRows.Cast<DataGridViewRow>().FirstOrDefault()?.DataBoundItem as DataRowView;
123123
if (row != null)
124124
{
125-
return (IntPtr)(long)row["address"];
125+
return (IntPtr)row["address_val"];
126126
}
127127
return IntPtr.Zero;
128128
}

Forms/ProcessMemoryViewForm.resx

-3
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@
132132
<metadata name="protectionColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
133133
<value>True</value>
134134
</metadata>
135-
<metadata name="stateColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
136-
<value>True</value>
137-
</metadata>
138135
<metadata name="typeColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
139136
<value>True</value>
140137
</metadata>

0 commit comments

Comments
 (0)