1

I have a application, which loads the dll by "Load-time dynamic linking". I can confirm the loading details by "Listdlls" utility.

My requirement is, i want to unload this dll ( which is loaded by "Load-time dynamic linking") at runtime not to wait for the program to exit.

is there a way to unload the dll which is loaded by "Load-time dynamic linking" at runtime?

Thanks, Samson

  • You can check the link, does it work? [unload-a-dll-loaded-using-dllimport](https://stackoverflow.com/questions/2445536/unload-a-dll-loaded-using-dllimport) – YangXiaoPo-MSFT Apr 29 '21 at 05:32
  • 2
    Use [delay-loading](https://learn.microsoft.com/en-us/cpp/build/reference/linker-support-for-delay-loaded-dlls?view=msvc-160) with `/delay:unload` instead, which allows explicitly unloading it later. – dxiv Apr 29 '21 at 05:44

0 Answers0