Thanks to view my post!
I want to learn how to create a project with mutithread,
would you like to tell me how to begin it?
my e-mail address is [email protected]
Thank you!!!
Printable View
Thanks to view my post!
I want to learn how to create a project with mutithread,
would you like to tell me how to begin it?
my e-mail address is [email protected]
Thank you!!!
Go and look at the CMTGDI sample for vc
Do plan your steps thouroughly!
Do you really need multithreading?
what communication is needed?
shared data?
does second thread need message loop (user interaction)?
Only after you have visualized the whole design of the program begin writing (I've learned the hard way)
To start a new thread is not very difficult. The thread procedure must be static! whithin the class, so if you want more than one instance, pass a this pointer to the actual instance as parameter in CreateThread function. Link with multithreading librarys (in project settings)
hope this offers some help
chrislaw
For books Win32 Multithreaded Programming by O'Reilly and a big part of Julian Templeman's somewhat deciving title "Beginning Windows NT Programming" by Wrox be my recommendations.
yalcin
Study existing examples
Ask questions
Experiment
BUT remember, all your shared data need to be protected in Critical Sections EVEN if you are just peeking at the value
The latter is true on NT platforms with multiple processors
sally