6.9. Processes

Windows' threads give you an extremely easy way to create multiple execution streams within an application. It is also easy for the threads to communicate with one another, because they share the same global variable space. Since the system does not copy any global or environment areas when creating a thread, threads also have a very low creation overhead.

Because of these advantages, you will generally create threads when you need multiple streams of execution. There are situations, however, where it is useful to be able to spawn an entirely new process. For example, if you want to create your own version of the File Manager, you need a way to launch other applications from within your application. The launched applications need ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.