I suspect this is a problem related to the built dll. Sorry, maybe this is not a pure C++ problem. Maybe it is a VC++ problem.