Hi,

The thing I try to do is following:

I have original DLL which I dont have sources and I want to write a log about how many times specifig functions are used. I was thinking to rename the original dll to something org_dll.dll and write my own dll.dll which then calls functions from org_dll.dll. And when the specific function is called then write to the log file and pass it to org_dll.dll. I hope you understand what I'm trying to do!

Now the tricky part (atleast for me) how do I know how many parameters those original functions take and what sizes are they?

regards, Sami
Posted on 2002-04-15 08:58:00 by SamiP
have a look at the return command of a specific function. If it returns f.e. "ret 8" then the function likely has 2 parameters.
If all functions return only with "ret", take a look at code calling the function, it should correct the stack after calling,
example "add esp, 8" - meaning also 2 parameters.

If neither first or second case, then the function has 0 paremeters.

(please remember: re-engeneering foreign code is sometimes a voilation of copyrights)
Posted on 2002-04-15 12:26:03 by beaster

(please remember: re-engeneering foreign code is sometimes a voilation of copyrights)


And it's forbidden to talk about on this board, too.
You're moving on thin ice, SamiP, be carefull what you ask...
Posted on 2002-04-15 12:30:17 by bazik
Thanks for the help Beaster!

I must say that the code of the program is owned by company wich I work for. The program is made few years ago by some summer holiday help worker as a sort time help... and it's still used today. Now we are moving to Windows XP and the program doesn't anymore work as expedted. Now I need to fix it or code a new program for that task... and as I'm so lazy I thought that simply logging what the program does gives me some glues about whats wrong with it.

Maybe its best to code a new program... atleast that way I know what it is doing :)

And lets leave skating on thin ice...

SamiP
Posted on 2002-04-15 13:30:32 by SamiP