草庐IT

ExitInstance

全部标签

windows - 我们可以从 ExitInstance 调用 FreeLibrary

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