Click to See Complete Forum and Search --> : win32 multithread info


kenobe
July 11th, 2005, 01:42 AM
How do I pass infomation between the threads in a win32 multithread enviroment

Andreas Masur
July 11th, 2005, 01:57 AM
[ Redirected thread ]

Andreas Masur
July 11th, 2005, 02:00 AM
There are different possibilities you can use...how are the data related to the thread? Is it a common date that isbeing read and written by both threads? In this case, you can use a common date which is accessible from both threads and is correctly synchronized in regard to its accessibility.

Another method is to simply exchange message between both threads using 'PostThreadMessage()' (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/messagesandmessagequeues/messagesandmessagequeuesreference/messagesandmessagequeuesfunctions/postthreadmessage.asp).

So...it kind of depends on the actual scenario...

kenobe
July 11th, 2005, 05:23 AM
Thank you very much. I got it