Thanks for the reply. It shed light on some details I wasn#t aware of. Anyway, I discovered that, for some reason, the dll was not unloaded at all (the statement was never executed due to some weird conditions I still don't get). Restructuring the code lead to unloading of the dll and now all works smoothly. It can be so simple sometimes... Nevertheless I got some more insight in the works behind the scenes, so this experience wasn't completely useless ;) Nick