From: | Sensei |
Date: | 22 Sep 2001 at 00:51:49 |
Subject: | [amiga-c] Re: Thanks |
Czesc Twelvebullets!
Dnia 21-Sep-01, Twelvebullets napisał:
>> You mean number of function? - ( library->lib_NegSize / 6 ).
> Sensei, I think its actually library->lib_PosSize / 6.
IT CANNOT BE! lib_PosSize for dos.library is sizeof( struct DosLibrary ), for
exec.library sizeof( struct ExecBase ) etc. etc.
> I`ve tried it
> with my library and it returns 7 which is correct.. NegSize / 6
> returns 11, which is wrong..
Do you really have 11 functions in your my.library? Or maybe you forgot to add
-1 at the end of vectors table?
> Also, how can I tell if a function has been patched to another library
> ??
But why to tell this at all? Nobody, except you, is tring to do this ;).
At LVO you have 2 bytes of machine JMP/BRA code and if it's JMP.L next 4 bytes
is address of function to execute.
> I thought I could compare the LVO address and the Libraries Base
> address, to determine which library is calling which LVO. I probably got
> this all wrong cos it doesn`t work for me.. Or, would I have to patch
> SetFunction and monitor it ??
> I want to write a program myself, not use a monitoring program, same
> thing as PatchControl..
PatchControl is patching SetFunction() in the first place and when some
program call it and wants to install patch, it's working as patch manager...
It's setting patches in correct order, as user wants, and storing information
what program what function patched. For this purpose it's allocating some
memory, and when program deinstalls patch this memory is also freed.
Regards!
Przemyslaw 'SENSEI' Gruchala
code/gfx2d/gfx3d/webmaster
Amiga 1200
Apollo 1240/33 MHz, 18 MB RAM, BTC 33.6 bps
HDD 3.2 GB, HDD 520 MB, CD x12
------------------------ 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/