When my program opens, before any of my code actually runs, it will automatically attempt to load various DLLs whose functions it imports. It looks in the folder that the app is in, and then in a few specific places like \Windows and \Windows\System32.
If I want to use some custom DLLs, but I don't want to clutter up the app's folder with them, is there a way to install them to a subfolder and then put something into the EXE that tells it where to look?
You must change PATH
environment variable. Try using SetDllDirectory()
function. Otherwise, you will have to dynamically load your DLLs.
Also see this question to avoid some more possible problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With