但jeff说会发生dependency loops, 这是什么意思?

解决方案 »

  1.   

    不可以!!会死机的参见MSDN中LoadLibrary说明:It is not safe to call LoadLibrary from DllMain. For more information, see the Res section in DllMain. 参见MSDN中DllMain说明:Warning  
    ... You must not call LoadLibrary in the entry-point function, because you may create dependency loops in the DLL load order. This can result in a DLL being used before the system has executed its initialization code. Similarly, you must not call the FreeLibrary function in the entry-point function on detach, because this can result in a DLL being used after the system has executed its termination code.