fixed memory editor writing

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@416 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
wj32
2008-12-25 01:13:21 +00:00
parent 178a01b000
commit bb161bcabc
5 changed files with 59 additions and 2 deletions
+2 -1
View File
@@ -180,7 +180,8 @@ namespace ProcessHacker
private void WriteMemory()
{
using (Win32.ProcessHandle phandle = new Win32.ProcessHandle(_pid, Win32.PROCESS_RIGHTS.PROCESS_VM_WRITE))
using (Win32.ProcessHandle phandle = new Win32.ProcessHandle(_pid,
Win32.PROCESS_RIGHTS.PROCESS_VM_WRITE | Win32.PROCESS_RIGHTS.PROCESS_VM_OPERATION))
{
int wrotememory = 0;
+1
View File
@@ -525,6 +525,7 @@
</Compile>
<Compile Include="Misc\Tokenizer.cs" />
<Compile Include="Structs\FieldType.cs" />
<Compile Include="Structs\IStructIOProvider.cs" />
<Compile Include="Structs\StructField.cs" />
<Compile Include="Structs\StructDef.cs" />
<Compile Include="Symbols\Symbols.cs" />
@@ -0,0 +1,30 @@
/*
* Process Hacker
*
* Copyright (C) 2008 wj32
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using System.Text;
namespace ProcessHacker.Structs
{
public interface IStructIOProvider
{
}
}
+3 -1
View File
@@ -25,6 +25,8 @@ namespace ProcessHacker.Structs
{
public class StructDef
{
public List<StructField> Fields { get; set; }
}
}
@@ -70,9 +70,27 @@ namespace ProcessHacker.Structs
}
}
private StructDef _struct;
private FieldType _type;
private bool _ptr;
public StructField(StructDef struc, FieldType type, bool isPointer)
{
_struct = struc;
_type = type;
_ptr = isPointer;
}
public bool IsPointer
{
get { return _ptr; }
}
public StructDef Struct
{
get { return _struct; }
}
/// <summary>
/// Gets the size of the field, in bytes.
/// </summary>
@@ -86,5 +104,10 @@ namespace ProcessHacker.Structs
return StructField.SizeOf(_type);
}
}
public FieldType Type
{
get { return _type; }
}
}
}