[Python-bugs-list] [ python-Bugs-459160 ] Py closes COM instances not loaded by Py

noreply@sourceforge.net noreply@sourceforge.net
Wed, 17 Apr 2002 19:19:52 -0700


Bugs item #459160, was opened at 2001-09-06 23:39
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=459160&group_id=5470

Category: Windows
Group: Python 2.1.1
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Mark Hammond (mhammond)
Summary: Py closes COM instances not loaded by Py

Initial Comment:
I have a script using win32com. An instance of a COM 
object is loaded. As part of the load, the server 
loads an instance of another com object. The server 
has a get property returning the IDisp of the server 
loaded object. In a def, the get property is used 
thus:- ocp.Msg1001.Data where, ocp is the Python loaded
ocject and Msg1001 is the serverloaded object. As soon 
as the def ends, Python garbage collects ocp.Msg1001 
rendering it unusable. If I create a variable in 
__main of ocp.Msg1001, all is well.

The problem is caused by the fact that Python cannot 
tell between a com instance it created and one it has 
been passed. 

----------------------------------------------------------------------

>Comment By: Mark Hammond (mhammond)
Date: 2002-04-18 12:19

Message:
Logged In: YES 
user_id=14198

I am afraid I can't understand this.  What I do understand 
seems to be working correctly.  There is no email address 
where I can get further information.

Anonymous - please either add a bug in the ActivePython bug 
database (please include sample code) or mail me directly.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2001-09-07 16:07

Message:
Logged In: YES 
user_id=31435

Reassigned to Mark.  Anonymous, you should really report 
this to ActiveState instead (the SourceForge Python project 
doesn't supply the Win32 extensions).

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=459160&group_id=5470