From: | Twelvebullets |
Date: | 21 Sep 2001 at 14:36:21 |
Subject: | [amiga-c] SetFunction vs SetFunction |
I`m having problems patching SetFunction to MyLibrary. I`ve patched
several DOS functions without any problems.
for Dos I do this:
Store Old Open:
LONG (*oldOpen) (__D1 STRPTR, __D2 LONG, __A6 struct DosLibrary*);
The Patch:
struct DosLibrary *MyDos;
MyDos = (struct DosLibrary *) OpenLibrary("dos.library", 0);
oldOpen = SetFunction((APTR)MyDos, -30, (APTR)NewDosOpen);
The Prototype:
Prototype LibCall extern BPTR NewDosOpen(__D1 STRPTR d1, __D2 LONG d2);
This works fine..
How do I patch an Exec function, or indeed any library funtion. Do I
need to pass the address of the library i`m patching in __A6 ??
If you`d like my Library code to use and abuse, its free from me..
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get your FREE VeriSign guide to security solutions for your web site: encrypting transactions, securing intranets, and more!
http://us.click.yahoo.com/XrFcOC/m5_CAA/yigFAA/dpFolB/TM
---------------------------------------------------------------------~->
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/