var:
a:^integer;
b:TCodeInfo;
begin
a := ptr($00400010);
b := parsecode(a);
showmessage(inttohex(b.opcode,4));
b := parsecode(b.next);
showmessage(inttohex(b.opcode,4));
end
Is it possible, to use parsecode with the memory address of another process (calc.exe) ?
No, that's not possible, because your process can't even directly reach another process. The only way to even access the memory/code of calc from inside your process is to use ReadProcessMemory.
If you want to disassemble code of another process, you have to inject a dll into that process and then call ParseCode/Function there.
It would be a nice Demo-project if you could provide some source code for that, Mathias. The Demo folder under madDisAsm is still "under construction"...
Yeah, I should really put something into the demo folder. But directly disassembling another process' memory will probably not be what I'll make a demo about. It's just too difficult to solve 100% right without using a dll.
But there are customers who have madDisAsm, but not madCodeHook. So I can't put a demo into madDisAsm's demo folder, which can only be compiled with madCodeHook. The demo has to be madDisAsm only.