@@ -30,22 +30,22 @@ public ProcessMemoryViewer(RemoteProcess process, ClassNodeView classesView)
30
30
if ( process . IsValid )
31
31
{
32
32
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 ) ) ;
35
36
dt . Columns . Add ( "name" , typeof ( string ) ) ;
36
37
dt . Columns . Add ( "protection" , typeof ( string ) ) ;
37
- dt . Columns . Add ( "state" , typeof ( string ) ) ;
38
38
dt . Columns . Add ( "type" , typeof ( string ) ) ;
39
39
dt . Columns . Add ( "module" , typeof ( string ) ) ;
40
40
41
41
process . NativeHelper . EnumerateRemoteSectionsAndModules ( process . Process . Handle , delegate ( IntPtr baseAddress , IntPtr regionSize , string name , NativeMethods . StateEnum state , NativeMethods . AllocationProtectEnum protection , NativeMethods . TypeEnum type , string modulePath )
42
42
{
43
43
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 ( ) ;
46
47
row [ "name" ] = name ;
47
48
row [ "protection" ] = protection . ToString ( ) ;
48
- row [ "state" ] = state . ToString ( ) ;
49
49
row [ "type" ] = type . ToString ( ) ;
50
50
row [ "module" ] = Path . GetFileName ( modulePath ) ;
51
51
dt . Rows . Add ( row ) ;
@@ -122,7 +122,7 @@ private IntPtr GetSelectedRegionAddress()
122
122
var row = sectionsDataGridView . SelectedRows . Cast < DataGridViewRow > ( ) . FirstOrDefault ( ) ? . DataBoundItem as DataRowView ;
123
123
if ( row != null )
124
124
{
125
- return ( IntPtr ) ( long ) row [ "address " ] ;
125
+ return ( IntPtr ) row [ "address_val " ] ;
126
126
}
127
127
return IntPtr . Zero ;
128
128
}
0 commit comments