Changing Windows DLL load order? (load order, not search order)

前端 未结 4 1510
半阙折子戏
半阙折子戏 2021-02-07 11:15

Say I have one executable: app.exe

I use 2 different 3rd party DLLs in this executable: foo.dll bar.dll and the Application must l

4条回答
  •  忘掉有多难
    2021-02-07 12:14

    Just add foo.dll to the import table of bar.dll, the OS loader will handle the rest.

    You should be able to do this without the source code for bar.dll, not sure if the editbin tool has such an option, but this is a fairly trivial edit to the PE file.

    You might instead be able to use the registry setting that preloads DLLs, but I wouldn't do that, you don't want foo.dll getting loaded into other processes that don't need it.

提交回复
热议问题