没有DLLMain,怎样才能获得hInstance呢?

解决方案 »

  1.   

    try   AfxGetInstanceHandle....
      

  2.   

    AfxGetInstanceHandle()应该在哪里调用呢?
    GetModuleHandle(dllname) 需要提供dll自身的名字?
      

  3.   

    LoadLibrary function
    http://msdn2.microsoft.com/en-us/library/ms684175.aspx
      

  4.   

    我要在DLL内部获得这个instance,不是在外部.
      

  5.   

    静态库的instance???
    怎么没听说过啊。应该使用
    AfxGetInstanceHandle()
      

  6.   

    AfxGetInstanceHandle()是正确的,刚才可能是其它地方出了问题.谢谢各位.