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

前端 未结 4 1437
半阙折子戏
半阙折子戏 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 11:54

    If you don't link the import library (foo.lib & bar.lib), then the loader will not automatically load the DLLs upon startup and you can call LoadLibrary() whenever you want.

    On a side note, I wrote a handy little library for encapsulating loading DLLs on the fly without having to deal with LoadLibrary/GetProcAddress directly. You can read about it here.

提交回复
热议问题