用LoadLibrary的方法是否只能调用动态链接库中的函数,而不能是类?
我知道调用函数的方法:GetProcAddress(hInst,"")
那么调用类的话是否也用上面的函数,我总是实现不了阿,
请各位老大指导一二,不胜感激~

解决方案 »

  1.   

    The exported class only applied to MFC DLL, and 'class' only is an abstract concept that's actually differ from an instance of function exported, so you can never use GetProAddress to gain an actual address with any class.
    It's only as a opinion myself.
      

  2.   

    Yes, you can, but you can only load DLL of the same version (that means, the same MFC versin number and the same building configuration). To prevent DLL hell, don't load DLLs in this way.Reference
    http://msdn2.microsoft.com/en-us/library/d5fzd0ek(VS.80).aspx
      

  3.   

    http://topic.csdn.net/t/20030108/15/1338940.html
      

  4.   

    http://www.codeguru.com/dll/expclass.shtml
      

  5.   

    导出非MFC类
    1:Using virtual functions table or vtable. This is the way COM operates. 
    2:Using direct calls through GetProcAddress.http://www.codeguru.com/Cpp/W-P/dll/importexportissues/article.php/c123