At the operating system level, a thread is an object created by the Object Manager. Like all the system objects, the thread has attributes (data) and methods (functions). The following table schematically shows the thread object and gives a list of its attributes and methods.
Most of the methods for threads have adequate Win32 API functions. For example, when we call SuspendThread
, the Win32 subsystem calls the corresponding method Suspend
. In other words, the Win32 API presents a method Suspend
for the Win32 applications.
Windows has always protected some internal structures, such as windows or brushes of direct manipulation. Threads that are executed on a user level can't directly examine or modify the interior of the system object. It can only be done by calling the adequate Win32 API method that can do something with an object. Windows provides an identification code that identifies the object, while the programmers pass the identification code to the...