I am creating this memory editor, but the subroutine ReadProcessMemory fails; so does WriteProcessMemory. I have tried to get the last error by using the GetLastError subrou
For ReadProcessMemory
you need PROCESS_VM_READ
permission and for WriteProcessMemory
you need PROCESS_VM_OPERATION
permission.
see http://msdn.microsoft.com/en-us/library/ms680553%28v=vs.85%29.aspx
and http://msdn.microsoft.com/en-us/library/ms681674%28v=vs.85%29.aspx
Very likely you need Administrator
rights, perhaps even SeDebugPrivilege
(which you would need to elevate your process to even with Administrator rights)...