unload activex

T

TestGames

Hi,
I need to unload my activex after using it throght my web page(java
script).
I create it using the new operator.
Is there any way or method to make ie unload the file.

Thanks,
TestGames
 
V

VK

Yes. If you set your ActiveX to a variable, setting that variable to
something else:

var myVar = new ActiveXObject("Msxml2.XMLHTTP");

//more code here

var myVar = null;

It is correct but only for "well automated" internal services like
IXMLHTTPRequest and so. If you are using ActiveX to launch some
application like MS Word or MS Excel then JScript garbage collector
may have not enough privilege to dismiss the process: they are acting
on different levels, JScript GC inside the current thread while say MS
Word is under the kernel "jurisdiction" where JScript GC is not
allowed. As a result you may end up with JScript reference removed but
the application itself running in orphan - from JScript point of view
- state. This is why I would suggest always first use Quit() or Exit()
method of application itself - if it is provided - and only then
nullify the reference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top