Amiga.org
Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: cycloid on November 25, 2003, 02:02:46 AM
-
i've adapted the wbtitle example code found on aminet and tried to patch one of the pen functions, such as ObtainBestPen etc. however nomatter how hard i try it just explodes when a program attempts to use any function i patch. however i succesfully got the wbtitle prgram working and patched the SetWindowTitles function. here's a faked synopsis of the code i'm using.
edit: code removed
this psudeo code only goes sofar as to insert my new function. note that here i'm only attempting to patch ReleasePen.... once built i can view a picture datatype but on attempting to close it my amiga explodes and i have to go on ebay to buy a new one. if i attempt to patch and of the Obtain... Pen functions the datatyped picture will, obviously, cause the crase upon opening..
thoughts?
edit: (code removed) i fixed it thanks to google groups... i was attempting to track what was happening via printf inside the patched functions = bad pointerage!
-
ok i can do it now, the next problem i have is that my patch app doesnt multitask, what is the form that i should use so that it can go in the startup sequence without stopping it in it's tracks? it's still based on the generic wb prog msg system (run it once to start it, run it again to stop it).