PDA

View Full Version : Breaking on an API programmatically


Iwarez
04-10-2003, 01:09 PM
For a softwrap dumper I plan to work on I want to receive a breakpoint when the program calls writeprocessmemory. Does anyone of you know how to achieve this? I tried using readprocessmemory and writeprocessmemory with valid processhandle but the funtion fails on reading anything outside the image of the exe. Help appreciated.

Iwarez
04-10-2003, 04:37 PM
I found out I passed a parameter wrong so the function would fail anyway.... Sorry. I now found I could succesfully write my own bytes in the API's code

squidge
04-10-2003, 05:52 PM
ISTR, nikolatesla20 wrote a sample program that did this a bit ago and submitted it to the board as an attachment. It was basically for patching IsDebuggerPresent on Armadillo'd apps. I believe the filename was "genericdebug".