Readcommand

OllyDbg Plugin API

Readcommand

Reads command from the memory of debugged process and restored breakpoints. Returns length of the read code (at most MAXCMDSIZE bytes) or 0 if memory can't be read.

Note: Any access to the memory in different process is extremely time-expensive. As in many cases different parts of OllyDbg access same command several times, Readcommand maintains small 1-command cache significantly improves the wholesave productivity of OllyDbg. If you need to access several compactly placed commands, Readmemory is usually much faster.

ulong Readcommand(ulong ip,char *cmd);

Parameters:

ip - address of the command in the memory space of debugged process. If ip is 0, function invalidates cache and returns 0;

cmd - buffer of length at least MAXCMDSIZE bytes that receives command.

See also: Disasm, Readmemory