我的DLL写在F:\VC\temp1\Debug\temp1.dll
里面就一个函数mess()
具体LoadLibrary该怎么用?请赐教,谢谢!

解决方案 »

  1.   

    The LoadLibrary function maps the specified executable module into the address space of the calling process. HINSTANCE LoadLibrary(
      LPCTSTR lpLibFileName   // address of filename of executable module
    );
     
      

  2.   

    加载:
    h_dll=LoadLibrary("new.dll");
    调用:
    GetProcAddress(h_dll,"function_name")
    这里要注意根据函数的不同的返回值进行修改获得函数指针,在调用。
    释放:
    FreeLibrary(h_dll)
      

  3.   

    加载以后如何执行里面的mess()函数呢?