Load multiple copies of dll in same process

后端 未结 2 1708
伪装坚强ぢ
伪装坚强ぢ 2020-12-17 21:26

I have a dll produced by a third party that has some sort of internal datastructure that limits it\'s size to X elements.

So basically, it has a Queue with X as the

2条回答
  •  抹茶落季
    2020-12-17 21:50

    Unfortunately, the NT core DLL loader routines don't expose a public interface to skip the pool of already-loaded DLLs. As such, you're left with just a few choices:

    • Copy, hardlink, symlink, and/or use reparse points to fool the loader into thinking you have multiple distinct DLLs.
    • Use multiple processes, and load one DLL per process.
    • Write a new DLL loader (very much not for the faint of heart!)
    • Convince the DLL's vendor to fix it (likely to be harder than writing a DLL loader :)

提交回复
热议问题