从内存中卸载OCX [英] Unloading an OCX from memory
问题描述
您好,
我正在尝试编写基于Embedded Chromium的ActiveX控件。 http://code.google.com/p/chromiumembedded/ [ ^ ]
我取得了一些成功但是一旦浏览器/控件不再可见并且控件被销毁,似乎activeX崩溃。我希望这个问题能在后续版本中得到修复(或者我发现我做错了会对这个糟糕的图书馆造成错误)。
但是我需要的是什么(作为一个快速解决方案)是一种终止该OCX上的所有线程的方法,一旦我使用它并从内存中卸载它...任何关于如何在C ++ / MFC中随意卸载(和重新加载)OCX的想法? />
问候,
Jerry
Hello,
I am trying to write an ActiveX control based on Embedded Chromium. http://code.google.com/p/chromiumembedded/[^]
I have had some success but it seems like the activeX crashes once the browser / control is non longer visible and the control is destroyed. I am hoping that the issue will be fixed in subsequent version (or that I find what I have done wrong to mistreat the poor library).
BUT what I need (as a quick fix) is a way of terminating all threads on that OCX once I have finished using it and unload it from memory... Any idea about how to unload (and reload) an OCX at will in C++/ MFC?
Regards,
Jerry
推荐答案
:: CoFreeUnusedLibraries();
确保你没有任何指示。
一行:: CoUninitialize ()
是我最喜欢的地方。
希望这会有所帮助,
Pablo。
::CoFreeUnusedLibraries();
Make sure you don''t have any pointers.
One line above::CoUninitialize()
is my favorite place to put it.
Hope this helps,
Pablo.
这篇关于从内存中卸载OCX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!