简体   繁体   English

从MFC程序中卸载dll文件

[英]Unload dll files from a MFC Program

I have a MFC program that even I close the program it does not get away and still shown in the task manager. 我有一个MFC程序,即使我关闭该程序也不会消失并且仍显示在任务管理器中。 When I look at the call stack I saw that some dll files are only loaded but not unloaded. 当我查看调用堆栈时,我看到某些dll文件仅被加载而未被卸载。

Is thee a way to make all the dll files unloaded when exit the program? 您是退出程序时使所有dll文件卸载的一种方法吗? So the exe will not be shown in the task manager. 因此,exe文件不会显示在任务管理器中。

I have declared some variables at top of the class: 我在类的顶部声明了一些变量:

vtkPoints *newPts = vtkPoints::New();
vtkPoints *newPtsSuction  = vtkPoints::New();     
CArray <double,double> ScalarValues_pressure;
CArray <double,double> ScalarValues_suction;
CArray <double,double> ScalarValues;

And add the values to them in another function and use the variables directly in another function. 然后将值添加到另一个函数中,并直接在另一个函数中使用变量。

The problem in first place is not DLL unloading. 首先,问题不是DLL卸载。 Your application freezes in a sort of dead loop or otherwise does not complete the termination properly. 您的应用程序死于某种死循环,否则将无法正确完成终止。 Having this fixed, the libraries will be unloaded automatically and the process will go, including from the task list. 修复此问题后,库将自动卸载,并且过程将继续进行,包括从任务列表中进行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM