How can I create a separate folder for my dll applications?

I have successfully split a large MFC project into several small DLL projects. Now I want to have a separate folder called "DLL" in my application folder, where all the DLL files from subprojects are located.

Can someone give me a guide on how to do this?

+1
source share
3 answers

If you use LoadLibrary, you just need to explicitly specify the full path to load the DLL.

If the DLLs are implicitly linked, you can do this in two ways.

  • Ask the installer to change the PATH variable. This is an obsessive and "bad form."
  • "loader", , .

DLL , .

+3

DLL - (Windows 2000 IIRC). DLL- <myapp>.exe.local, Windows -, LoadLibrary(Ex). DLL.

+3

EDIT: , . .

See How to Search for a Dynamic-Link Library . In short, you can do this using the registry keys in the "HKEY_LOCAL_MACHINE \ SORTWARE \ Microsoft \ Windows \ CurrentVersion \ App Paths" section. A reg file like the one below shows how:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MyApp.exe]
@="C:\\Program Files\\MyCompany\\MyApp\\MyApp.exe"
"Path"="C:\\Program Files\\MyCompany\\MyApp\\MyDLLs"
-2
source

All Articles