Multithreading with C and Win32
Microsoft Visual C++ provides support for creating multithread applications with 32-bit versions of Microsoft Windows: Windows NT and Windows 95. You should consider using more than one thread if your application needs to manage multiple activities, such as simultaneous keyboard and mouse input. One thread can process keyboard input while a second thread filters mouse activities. A third thread can update the display screen based on data from the mouse and keyboard threads. At the same time, other threads can access disk files or get data from a communications port.
With Visual C++, there are two ways to program with multiple threads: use the Microsoft Foundation Class library (MFC) or the C run-time library and the Win32 API. For information on creating multithread applications with MFC, read the Multithreading with C++ and MFC articles after reading these articles about multithreading in C.
This article family explains the features in Visual C++ that support the creation of multithread programs.
Note Win32s does not support multithreading. Calls to the Win32 APIs and C run-time library functions mentioned in this article family will return an error.
What do you want to know more about?
- What multithreading is about
- Library support for multithreading
- Include files for multithreading
- C Run-Time library functions for thread control
- Sample multithread program in C
- Writing a Multithread Win32 Program
- Compiling and linking multithread programs
- Avoiding problem areas with multithread programs
- Thread local storage (TLS)