It's also possible I have to initialize this library, i.e. to call some kind of function other than DllMain (which by the way is called automatically).