DLL dependency question / SetDLLDirectory

前端 未结 4 1470
小鲜肉
小鲜肉 2020-12-20 03:06

I have the following situation and can\'t come up with any good solution.

I have a C++ application (app.exe) installed in C:\\ProgFiles\\MyApp. It needs a bunch of

4条回答
  •  抹茶落季
    2020-12-20 03:33

    Using the delay load option in conjunction with SetDLLDirectory might work. A delay loaded DLL is dynamically loaded by the system on its first reference. If you are using Visual Studio, you can specify which DLLs are to be delay loaded in the project properties under the Linker Input options. There is a Delay Loaded DLLs field for specifying them. Otherwise, you can specify /DELAYLOAD:mydll.dll in the linker command.

提交回复
热议问题