从MSDN文档中可以看出,在DllMain入口函数中不应该调用LoadLibrary/FreeLibrary。Theentry-pointfunctionshouldperformonlysimpleinitializationorterminationtasks.ItmustnotcalltheLoadLibraryorLoadLibraryExfunction(orafunctionthatcallsthesefunctions),becausethismaycreatedependencyloopsintheDLLloadorder.ThiscanresultinaDLLbein