Is it possible to embed an external CLI/C++ DLL into a MFC EXE as a embedded resource or something like that? My application currently connects to DLL sitting right beside it that has some basic functions like connect to database, pull information from DB, etc..
I use LoadLibrary to use the DLL functions. Then I secure my EXE with themida and pack the EXE and DLL together. The problem is though to pack the DLL and EXE I have to disable file patching in themida which is a very strong feature. I have to disable it because when I pack my EXE it needs to modify the file a bit, and then themida thinks it has been cracked or something and does not allow the application to work.
So is there a way to embed this DLL into my EXE? The DLL is not compatible with themida sadly which is why it is a separate file.
1) Add a Resource Script file in the executable project.
2) Compile RC file to RES file using the Resource Compiler:
If you are using Visual Studio, it will build the RES file and will also bind it with executable.
3) Find and load the resource from the executable:
You could try using Enigma Virtual Box. This will pack DLLs into an EXE so that
LoadLibrary
"just works". Of course, if it's a C++/CLI DLL then you'll still need the .NET framework installed.