Juan Lang juan_lang@yahoo.com writes:
I'm unable to reproduce the infinite loop under XP. As far as I can tell this shouldn't produce one, either: since I don't modify the value of hShell32, FreeLibrary should eventually fail when the refcount on the library reaches 0 and the library is actually unloaded.
There is no guarantee of that, there are many cases where a dll cannot be unloaded, for instance if it contains TLS data. You'll need to spawn a child process if you want to reliably test the shell32 init code.