Re: [python-win32] Passing data in a windows message

2008-12-10 Thread Tim Golden
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 SendM

Re: [python-win32] Passing data in a windows message

2008-12-10 Thread Tim Roberts
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 woul

Re: [python-win32] Passing data in a windows message

2008-12-10 Thread Thomas Heller
Tim Golden schrieb: > I'm using win32gui.PyGetBufferAddressAndLen to pass the address & length > of a marshalled object as the wparam / lparam of a windows message. > Something like this: > > address, length = \ > win32gui.PyGetBufferAddressAndLen (buffer (marshal.dumps (message))) I guess th

Re: [python-win32] Passing data in a windows message

2008-12-10 Thread Tim Roberts
Tim Golden wrote: > I'm using win32gui.PyGetBufferAddressAndLen to pass the address & > length of a marshalled object as the wparam / lparam of a windows > message. Something like this: > > address, length = \ > win32gui.PyGetBufferAddressAndLen (buffer (marshal.dumps (message))) > PostMessage (se

[python-win32] Passing data in a windows message

2008-12-10 Thread Tim Golden
I'm using win32gui.PyGetBufferAddressAndLen to pass the address & length of a marshalled object as the wparam / lparam of a windows message. Something like this: address, length = \ win32gui.PyGetBufferAddressAndLen (buffer (marshal.dumps (message))) PostMessage (self.hwnd, self.WM_PROGRESS_ME