editing user32.dll to change behavior of a function
Posted on 2004-11-16
I want to make a copy my user32.dll but change the SendMessage function in it to first write info about the function call into a text file, and then do its normal thing. This way i can swap in and out my original user32.dll and modified one. This way i can monitor calls to the sendMessage function when i want. How would i go about doing this. Where in the user32.dll file would i insert my code for writing the function call's info. My thinking is to just insert my code at the top of the original SendMessage function body in user32.dll, but how do i find where the original SendMessage function body is? Any answers on how to go about doing this?