Hacker News new | ask | show | jobs
by Joker_vD 1676 days ago
Nah, it's a rather basic problem and the solution is well known: do another LoadLibrary on the already loaded library. Of course, then you need a Free­Library­AndExit­Thread... [0] And the posts following [0] (you can see them at the bottom of the page in the "Read Next" section) explain more of the context.

All this stuff is there because of the built-in threading support in COM which, arguably, was pretty convoluted for some rather strange reasons ― what's the point of such precise RAII-ing of the DLLs? I guess the address space was really precious back then or something.

[0] https://devblogs.microsoft.com/oldnewthing/20131105-00/?p=27...