bazze opened this issue on Jan 12, 2007 · 84 posts
kawecki posted Sat, 20 January 2007 at 3:53 PM
Quote - The DLL trick would work because Windows does all the relocation for you when you link to it, either at load time or dynamically with the LoadLibrary call. The same as linking to any other DLL, except this one was just created.
DLL is just another exe file, DLL load into a memory when an exe file needs this DLL and is relocated before is executed, so no difference between an ordinary exe file.
The only way to have an encrypted EXE or DLL is to load it into memory, decrypt and only then relocate, but this is not the way how Windows work.
It is possible to make an encrypted EXE, but the task is very tricky and is not possible to have 100% encrypted, only a part of the code can be encrypted.
This is not easy task, is needed some knowledge that normal programmers haven't, you must be very careful what you are doing and any debug, bug correction, patch or update will turn into a pharaonic job.
Quote - If the operating system was designed to support it, it would even be possible to have the DLL "file" exist only in memory, and protected so that no other process would be allowed to access it.
But this kills the DLL concept!. DLL are libraries for anyone and any task use them.
If you want to some DLL to be exclusive to why, why do you use a DLL? You can link a static library to your code and all will be contained in your EXE.
Stupidity also evolves!