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!