troubleshooting Question

FreeLibrary hangs for no reason!?

Avatar of motiz88
motiz88 asked on
4 Comments1 Solution1957 ViewsLast Modified:

I wrote a program that loads a number of DLL's at startup. Each DLL exports a single function which returns a class type. The ancestor class is defined in a common unit, and each DLL derives its own class from it.

So far, so good (at least theoretically). But in fact, the program hangs when unloading the DLLs using FreeLibrary - Even if it's just:


It works with several Windows DLL's that I picked out randomly, but with none of mine (Actually, it did work with a few of them until I rebuilt them all). I can't afford to keep them all in memory, as I have around 30 of them (and counting). So my question is: What can possibly be wrong with those DLL's? It doesn't seem to make any sense.

Thanks a lot,


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros