I’ve been asked by a friend of mine for sample code on debugging APIs. The code starts and debugs the Minesweeper game that comes with Windows 7, using breakpoints and single steps. When the user clicks a bomb, the instruction pointer is moved so that it doesn’t explode.
Updates
14/04/2012: fixed a bug
Downloads
Source code (x86 and x64 compatible)