Working with C# in .NET, I am trying to call IActiveScript.Close
on my instance of the Windows Scripting host.
Since I am currently hunting memory leaks, I discovered that I did not call this Close
method and tried to add the missing code. So I added a call to the Close
method.
Unfortunately, when calling the Close
method, a COM exception is thrown with E_UNEXPECTED as the error code.
Querying the script state of the engine before closing it, it returns SCRIPTSTATE_CONNECTED
.
Question:
How can I gracefully call IActiveScript.Close
without getting an exception thrown?
Thanks
Uwe