It could be that there isn't any way for one DLL to determine if it is the only one dependent on those DLLs or if there are other parts of the app that are also using them. So it can't arbitrarily unload all of the DLLs it depends on, because that might break the application. Only the OS knows for sure which binaries have loaded which dependent DLLs and can unload those after all of the "parent" DLLs have unloaded.
There might be some Windows-specific API that you can use to determine which DLLs yours has loaded and maybe what the reference counts are for those (if Windows uses reference counting at all to keep track of how many users of a DLL there are), but that's way beyond anything I've ever needed to do.
Bookmarks