Hi Mark,

I'll try a version calling Excel via DDE as time permits.
It's not a show stopper, I just have to be careful.

Thanks,
Ray

At 04:16 PM 5/26/2005, Mark Hammond wrote:
I can see no obvious leaks in the dde code.  It is possible the problem is at the "other end" of the conversation?  If it possible to create a repro case using Python code at both ends?



-----Original Message-----
From: [EMAIL PROTECTED] [ mailto:[EMAIL PROTECTED]]On Behalf Of Ray Schumacher
Sent: Friday, 27 May 2005 3:51 AM
To: python-win32@python.org
Subject: [python-win32] dde.pyd always dies after exactly 16378 Requests

In the attached .py test, I start an external program that provides data access via DDE.
create a server
do a number of CreateConversation-s, one for each channel
make connections
do lots of .Request on the connections

I tried just one channel, one connection, still 16378, so it seems to be the total number of requests, irrespective of connections/Conversations.

Do I need to periodically clean up resources somehow?

The docs at Activestate are a bit sparse, and I could not find the answer from MSDN.com:
"The maximum number of DDE conversations that can be open simultaneously is determined by Microsoft Windows and your computer's memory and resources. If the conversation can't be initiated because application isn't running or doesn't recognize topic, or if the maximum number of conversations has already been reached, the DDE function returns a Null. "
But, conversations is not the issue.

Am I doing DDE in a fundamentally inefficient manner?
Would using 'CreateServerSystemTopic', 'CreateStringItem', 'CreateTopic' help at all?

When I run this script (or similar, counting requests), it always ends up like this:
C:\python ddeclient_tst.py

...
16362 same
16363
16364
16365
16366
16367
16368
16369
16370
16371 same
16372
16373
16374
16375
16376
16377
16378     <---- dies here with Windows error
>> C:\

I could shut down the server and reconnect it all, but that takes significant time.

Thanks,
Ray
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to