CrazyProg wrote:
There is a hack you can use instead.
1) carefully write you function according to the prototypes in the interfaces drawer.
2) open the library (not needed for exec)
3) remember what the vector is (oldvector = IExec->AllocPooled;)
3) Set the vector for the function (IExec->AllocPooled = MyAllocPooled;)
4) do your stuff
5) restore the function pointer back to what is was (IExec->AllocPooled = oldvector;)
6) exit your program.
If you're gonna do it that way, add a check to step 5 to only restore the vector if it still points to your function.If it doesn't match then it means something else has SetFunction()'d it too and could possibly call your old function, with no way of knowing you've removed it.