2

I would like to use manifest to load c++ dll in sub directory of the exe directory. For example: the folder structure like below:

enter image description here

LoadApp depends on LoadDll, both are native c++ projects. LoadDll.dll is in the sub directory "sdk". Run LoadApp.exe, it says "Can not find the LoadDll.dll". I have embedded the sdk.manifest fie to LoadApp.exe, but seems it does not work. Here is content of sdk.manifest:

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

  <file name="sdk\LoadDll.dll">
  </file>

</assembly>

I know using LoadLibrary or SetDllDirectory or Environment path can resolve the dll loading problem. But I would like to know what is wrong with manifest solution? Is it able to use manifest file for native c++ projects?

3
  • Please take a look at this and this. Commented May 21, 2018 at 15:05
  • @Ron, I tried what you linked, but both did not work. Commented May 22, 2018 at 1:20
  • You can add a manifest to native EXEs, and it will work for things like DPI awareness. I have no idea about this usage. Commented May 22, 2018 at 1:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.