Question

In the classic book "Multithreading Applications in Win32", at page 31, there is a statement as follows:

To enforce security, it is not possible to obtain a handle from a thread ID.

However, I know there is a well-known API, i.e. OpenThread, can do this job.

Is this a bug of the book?

Was it helpful?

Solution

The book in question Multithreading Applications in Win32 was published in 1996, which predates the operating systems where the OpenThread() function was available. So, the book is simply out of date.


The above MSDN link says that OpenThread() requires WindowsXP/2003. However, as Luke noted in a comment below, it seems this function was also in Windows 2000. (Which still predates the book in question, but I thought it worthwhile to clarify.

References:

  1. OpenThread returns null Win32
  2. re: OpenThread
  3. Win32::API error - OpenThread
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top