是这种方式导入的
#ifdef USE_SPEECH_DLL //定义了USE_SPEECH_DLL,就按生成DLL,声明导出导入类
#define LANE_SPEECH_DLL __declspec(dllimport)
#else //没定义USE_SPEECH_DLL,则不声明导出或导入类(LANE_SPEECH_DLL就为空)
#define LANE_SPEECH_DLL
我想释放它的资源,该如何手动释放

解决方案 »

  1.   

    如果是显示加载的DLL,可以用FreeLibrary释放掉DLL
    如果是隐式加载,只能等到程序退出才会释放
      

  2.   

    The FreeLibrary function decrements the reference count of the loaded dynamic-link library (DLL). When the reference count reaches zero, the module is unmapped from the address space of the calling process and the handle is no longer valid. BOOL FreeLibrary(
      HMODULE hModule   // handle to DLL module
    );