1,Exe需要知道
2,一般是回调函数

解决方案 »

  1.   

    资源ID应该是设计者事先知道的,用loadlibrary得到资源dll的句柄,很多api都会用到:
    HICON LoadIcon(
      HINSTANCE hInstance, // handle to application instance
      LPCTSTR lpIconName   // name string or resource identifier
    );HANDLE LoadImage(
      HINSTANCE hinst,   // handle to instance
      LPCTSTR lpszName,  // image to load
      UINT uType,        // image type
      int cxDesired,     // desired width
      int cyDesired,     // desired height
      UINT fuLoad        // load options
    );
    这些函数的HINSTANCE参数就是资源实例的句柄,如果用mfc可以使用AfxSetResourceHandle将dll的instance设一下
      

  2.   

    hInstance用于指明你想加载的资源所在的文件。
      

  3.   

    对于第二个问题,如果不使用回调函数的话,可能就要做成COM的连接点那样的了
      

  4.   

    多谢各位支持,第一个解决了,第二个还是有点麻烦。我的DllFun调用了EXE的fun1函数,
    然后EXE的main调用了DLLFun函数。 不用回调函数有其他方法么。
    com就不考虑了
      

  5.   

    1.http://community.csdn.net/Expert/topic/3296/3296255.xml?temp=.6883051
      

  6.   

    2.http://community.csdn.net/Expert/topic/3296/3296255.xml?temp=.6883051
      

  7.   

    2.
    http://www.codeguru.com/Cpp/W-P/dll/article.php/c3649/