Before venturing into a programmatic method of instrumenting the playing grid
the reader will first be introduced to tools provided by WinDBG, more
specifically, the (e)nter values command. This command allows the reader to
manipulate specific portions of virtual memory and can be utilized to, amongst
other things, remove bombs from the WinMine playing grid. First, reset the
grid by resuming the WinMine process in WinDBG, clicking on the yellow smiley
face in WinMine, and running the SetGrid application. Next, click on
the top left position to expose the two and break the WinMine process within
WinDBG by pressing Control+Break. The reader should recall that the address
0x01005362, to the immediate right of the two, contains a bomb. To demonstrate
the enter values command perform the following in the Command window.
eb 0x01005362 0x0f
Resume WinMine in WinDBG and click on the position to the right of the two.
Notice, instead of a bomb being displayed, the number two is revealed. The
reader could perform the tedious task of performing this function manually
throughout the grid, or, one could develop an application to reveal and/or
remove the bombs.