November 2007
Intermediate to advanced
848 pages
27h 15m
English
We’ve already discussed how a process’ primary thread comes into being when CreateProcess is called. If you want to create one or more secondary threads, you simply have an already running thread call CreateThread:
HANDLE CreateThread( PSECURITY_ATTRIBUTES psa, DWORD cbStackSize, PTHREAD_START_ROUTINE pfnStartAddr, PVOID pvParam, DWORD dwCreateFlags, PDWORD pdwThreadID);
When CreateThread is called, the system creates a thread kernel object. This thread kernel object is not the thread itself but a small data structure that the operating system uses to manage the thread. You can think of the thread kernel object as a small data structure that consists of statistical information about the thread. This is identical to the ...
Read now
Unlock full access