in Resources and DLLs ::
The article how to store a DLL inside a Delphi program exe file as a resource explains how to ship a DLL with your Delphi application executable file as a resource.
Recently, I've received an email from Mark E. Moss, asking if a DLL stored in a RES can be used without first saving it on the file system (hard disk)? My initial answer was "to use a DLL stored inside a Delphi application executable file, the DLL first needs to be stored on the file system". I was wrong :)
Read the full article to learn how to Load a DLL From a Resource Directly From Memory in Delphi Applications.
NOTE: Soon after publishing this article I've received an email from Jason Penny:
The linked BTMemoryModule.pas does not work with Delphi 2009 (and I would assume Delphi 2010 also).
I found a similar version of the BTMemoryModule.pas file a while ago, and made changes so it works with (at least) Delphi 2006, 2007 and 2009. My updated BTMemoryModule.pas, and a sample project, are at BTMemoryLoadLibary for Delphi >= 2009"
Related:


This is quite interesting – certainly will give it a go.
Thanks for the post Zarko.
You’re great, ma men…
I would also like to point out that if your program has any dependencies with Visual C libraries (like MSVCP80.dll) it will not load. You can find out more information here: http://msdn.microsoft.com/en-us/library/ms235624(VS.80).aspx
Now a short workaround is to recursively load with BT each dependency as well as the main dll. But you’ll end up with a big mess.
However, if you have a DLL that you created that uses the standard libraries (Kernel32, User32, etc) then BT works great.