How can I make a separate folder for my application's DLLs?

后端 未结 3 1264
独厮守ぢ
独厮守ぢ 2021-01-21 18:44

I have successfully divided a large MFC project into a couple of smaller DLL projects. Now I want to have a separate folder called \"DLL\" in my application\'s folder, where all

3条回答
  •  花落未央
    2021-01-21 19:29

    EDIT: As pointed out by Eric this doesn't work. Sorry.

    See Dynamic-Link Library Search Order. In short you can do so using registry keys under the "HKEY_LOCAL_MACHINE\SORTWARE\Microsoft\Windows\CurrentVersion\App Paths" key. A reg file like the following 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"
    

提交回复
热议问题