                                    W32Patchit
                          W32Dasm V8.93 Permanent Patch Maker


                              Written By Harlequin    
                              
                                     7/2000

_____________
What it does:
This patcher will add a button to your W32Dasm CodePatcher screen which will allow you to save your patches directly into the program.
It will also change the W32Dasm CreateFile call so that you can then edit and save files whilst you have them open in W32Dasm.


_____________
How it works: 

It copies the patch data from patch window to the clipboard then patches it into the file saving the updated file as P*.exe (where * is the original file name). On subsequent patches it will first check to see if there is already a file with the name P*.exe and if so it opens and maps this file not the original which you have open in W32Dasm.

My reasoning for this was that I was unable to get the dll to write to the W32Dasm open file consistantly even after changing the W32Dasm CreateFile function to allow file sharing. I chose to use the P*.exe file if it exists rather than the original because in this way several patches can be made or corrected at a single sitting.

_____
Note:

The patcher is very simple and no checking takes place. It simply finds the offset and patches in the bytes.

The clear patch button in W32Dasm clears the patch from memory and therefore the original but it will not clear the P*.exe file.

If you try to patch a file and there is not relevant data in the patch window (clipboard) it will cause a GPF. Sorry I should fix this but what the hell, just don't do it. I have included the source code though should you want to fix this or any other problems.


I have tested this program probably a lot more than I would have liked :-) but there may still be bugs. I take no responsibility for any problems you may experience. However if you have problems that you think I might help with you can contact me at:  

Mail@Harlequin00.cjb.net


I have included the program W32pManual.exe just for your convenience. I threw it together in a hurry so that I could test the dll without loading W32Dasm everytime. It has some wierd bugs (such as calling the couldn't do message after the done message) but it does the job. If you manually cut a W32Dasm patch to the clipboard then give this program the path and name of the file you want patching it will go ahead and do it. Assuming it's in the same directory as the dll of course. Note though the path should not contain a terminating \ as this is added by the program.


The W32patch.dll should be placed into the same directory as your patched W32Dasm89.exe or in your system path. Once the patch has been applied you no longer need the W32patch.exe patching program and you can delete it if you so desire but the W32patch.dll IS required.

In the source code zipfile I have also included an essay on how the button was patched into W32Dasm. Should you have a different version of W32Dasm then with this essay you should be able to manually add the button and patch.


                                    Harlequin
