resolve problem with unregister function in dllmain.cpp