[python-win32] Passing data in a windows message

Tim Golden mail at timgolden.me.uk
Wed Dec 10 20:58:22 CET 2008


Tim Roberts wrote:
> Thomas Heller wrote:
>> Since you used PostMessage, the message is simply posted to the thread's
>> message queue. You have no control when it is processed; so I fear you
>> must keep the posted 'object' alive even longer.
>>   
> 
> This is a good point that I overlooked.  If you used SendMessage, it
> would block until the other end acknowledged it.
> 

Thanks, Tim & Thomas. Pretty much what I thought was happening,
but good to get confirmation from more authoritative sources.
For some reason which now escapes me, I had tried to avoid
using the SendMessage route but it seems like the cleanest
way out. (I think I was trying to avoid a circular message
path, but that doesn't seem to apply now if it ever did).

Thanks for you input.

TJG


More information about the python-win32 mailing list