Use DLL from Resources (RES) Without Storing It On The File System First
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…