Some people have recently asked (in Sandman's forum) for info on process
patching etc. so I thought I'd post these sources, in the hope that it will
help.

They're easier to follow than others I've seen (because they're in <horror> C ;)).

File's included:-

-----------------
ProcPatch.c
-----------------
This is a VERY simple process patcher.
It's actually a nice trainer for DeltaForce.
It's a pretty old game now, so I don't mind releasing it.
(If I'd have released it when it was done there would have been chaos,
because it shows all the locations and viewing directions of all opponents
in MultiPlayer aswell as being able to alter the scope magnifications etc hehe;))
It works by finding the processId and using Read/WriteMemory - ie pretty
standard stuff.
Note: So as not to confuse things all the resource files (dialogs/icons) etc are not included.

-----------------
PrePatch.c
-----------------
Again, pretty simple, easy to follow C which describes the steps involved
in 'pre-patching' a target - in this case Colin McRae's Rally.
(Had some very nice touches including removing object collisions etc ;))
Anyway, it works by loading the executable as a process (CreateProcess)
and patching the file before letting it go.
Note: So as not to confuse things all the resource files (dialogs/icons) etc are not included.

-----------------
WinDebug.c
-----------------
Perhaps the most 'complex' of them.
It makes use of the stuff described in ProcPatch.c and PrePatch.c to show
just what can be achieved with relatively little code.
Basically it's a 'debugger'.
It's flexible and can easily be extended to handle breakpoints/watches etc. (I already have ;))
This version handles and reports such stuff as DLL loading, all (otherwise hidden) calls
to OutputDebugString, details any type of Exception (including full register output).
And logs it all to a file, which can be automatically read with notepad (CreateProcess again ;)).
Note: So as not to confuse things all the resource files (dialogs/icons) etc are not included.

If anyone requires further info then I suggest checking out tut's (found all over the place)
Fravia's site is a must, and (especially for this type of stuff) I strongly recommend
reading Stone's excellent tuts.  Seek and ye shall find.

If all else fails, and you have tried EVERYTHING else then email me,
although I cannot guarantee a response.

You're free to change/add to the code (in fact it's actively encouraged!).

If you like what's here, or it's helped you in anyway all I ask is that
you take time to listen to some music by the master - Oliver Lieb ;)

Anyroad, Tarra!

/Miz.
CodeRage@bigfoot.com
--------------------