http://bugs.winehq.org/show_bug.cgi?id=20711
--- Comment #22 from Henri Verbeet hverbeet@gmail.com 2010-03-29 06:36:49 --- (In reply to comment #21)
Finally got the idea. Nevertheless using GetModuleHandle leaves a bad taste. We cannot rely on the library existence between the two calls in a multithreading environment. To be sure one needs to call GetModuleHandleEx using the increment counter. So we once again have the FreeLibrary Call.
Well yeah, but we're already keeping a reference to the module, and that didn't stop the application from freeing it either.
Do you think this would be a possible solution?
Sure, needs tests though.