I am using web browser controll (shdocvw.dll) to load a
local html page containing a third-party ActiveX object
(which cannot be imported directly into the windows
application). Browser crashes when I try to navigate to
another page containing the same ActiveX object and I
thought of disposing of my browser object hoping that this
will dispose of the ActiveX object too, and then to create
a new instance and navigate to the second page. (When
using Internet Explorer, this was the only way - close the
IE and open it again).
I instantiate with:
axWebBrowser1 = new AxSHDocVw.AxWebBrowser();
I have found that Marshal.ReleaseComObject(obj) might be
the way, but it is not clear to me what is the obj in my
case.
I have tried Marshal.ReleaseComObject(axWebBrowser1); but
I got InvalidCast exception.
Thanks for help
Dusan
local html page containing a third-party ActiveX object
(which cannot be imported directly into the windows
application). Browser crashes when I try to navigate to
another page containing the same ActiveX object and I
thought of disposing of my browser object hoping that this
will dispose of the ActiveX object too, and then to create
a new instance and navigate to the second page. (When
using Internet Explorer, this was the only way - close the
IE and open it again).
I instantiate with:
axWebBrowser1 = new AxSHDocVw.AxWebBrowser();
I have found that Marshal.ReleaseComObject(obj) might be
the way, but it is not clear to me what is the obj in my
case.
I have tried Marshal.ReleaseComObject(axWebBrowser1); but
I got InvalidCast exception.
Thanks for help
Dusan