专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > QT开发

Qt中动态调用dll后,怎么释放dll

发布时间:2010-05-30 21:34:54 文章来源:www.iduyao.cn 采编人员:星星草
Qt中动态调用dll后,如何释放dll?
QLibrary mylib("aaa.dll"); 
if (mylib.load())  
{  
  //创建一个dll对象,将其放入一个窗口中
}  
 
当我关闭窗口的时候,如何释放dll呢?
ps:当我load两次dll的时候,关闭窗口时,就会报错:“Unhandled exception at 0x02938c13 in XXX.exe: 0xC0000005: Access violation reading location 0xfeeefefa.”
求高手,求解释,求解决。。。。

------解决方案--------------------

bool QLibrary::unload ()
Unloads the library and returns true if the library could be unloaded; otherwise returns false.
This happens automatically on application termination, so you shouldn't normally need to call this function.
If other instances of QLibrary are using the same library, the call will fail, and unloading will only happen when every instance has called unload().
Note that on Mac OS X 10.3 (Panther), dynamic libraries cannot be unloaded.
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: