Title: Python script engine: GetTypeInfoCount() & reentrant issues...

Hi!

During the integration of the Python IActiveScript in our environment
I've discovered two issues:

1. I'm not able to get type information via GetTypeInfo() from
the currentrly executing script. IActiveScript->GetScriptDispatch()
returns a valid IDispatch but the IDispatch implementation seems to
doesn't support GetTypeInfo() because GetTypeInfoCount() returns zero.
This makes it impossible for me to read the values of the variables
from the running script.

2. If I create a second script engine from the same process via
CoCreateInstance() during the execution of another script the first
script engine doesn't release the interface pointers it holds on termination.
The second instance terminates normally and releases all interfaces.

The interfaces are added via IActiveScript->AddNamedItem().
Normally the scripting engine releases its interface pointers during
IActiveScript->Close(). This works with the Python engine for me as long as I
don't create another instance of the engine. The references created while
executing IActiveScriptParse->ParseScriptText() are released and everything is fine.

With the second instance the references of the first engine are left over. The
second instance terminates and releases all, but the first engine still holds
the references. I checked the code for several times and the same code works
for VBScript and JScript.

I don't want to exclude a mistake on my side. Maybe Microsoft is so kind to me
that it never occured before.

Any ideas?

Best regards

... Clemens Uhlenhut
... Software Engineer
... Altova GmbH - The XML Spy Company

Reply via email to