dynamic vs. static lib

contains all delphi packages mentioned below
Post Reply
xrfang
Posts: 68
Joined: Mon Feb 28, 2005 7:29 am

dynamic vs. static lib

Post by xrfang »

hi Mathias,

I just bought your madCodeHook product. Now I have a question: I plan to use static lib instead of the dynamic while I was trying your software. However, using static lib will make my dll larger, which is not too good.

The question is: what is the benefit that we use a static lib instead of dynamic? Is there any performance gain? (both in speed or in memory usage). And if your suggestion is to use the dynamic one, can we change the name of the madcodehook.dll (so that people don't know that we used madcodehook :crazy:
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Using the static lib is better because you don't need to ship an additional dll, plus you don't need to copy any dll to the system folder. When using the dynamic lib and when doing system wide dll injection/api hooking you need to copy madCHook.dll to the system folder!

You can rename madCHook.dll, if you prefer that. But the version information of the dll still indicates what the dll is...
xrfang
Posts: 68
Joined: Mon Feb 28, 2005 7:29 am

Post by xrfang »

madshi wrote:Using the static lib is better because you don't need to ship an additional dll, plus you don't need to copy any dll to the system folder. When using the dynamic lib and when doing system wide dll injection/api hooking you need to copy madCHook.dll to the system folder!

You can rename madCHook.dll, if you prefer that. But the version information of the dll still indicates what the dll is...
Hi Mathias, renaming dll is kind of kidding, what I am thinking is that will the dynamic dll save memory? (i.e., is there any penalty in using the static lib?

Thanks,
Shannon
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

You might save some disk space when using the dynamic lib. You will not lower RAM consumption. Except if you're using more than one hook dll. Then you'll save both disk space and lower RAM consumption. If you have one hook dll only I recommend to use the static lib. Even for 2 hook dlls I'd probably still recommend using the static lib, to be honest. It's just much nicer to deal with.
Post Reply