Article ID: 951322 - Last Review: April 30, 2008 - Revision: 1.0 The WaitForMultipleObjects() function does not work correctly with pseudohandles in Windows XP, in Windows Server 2003, or in Windows VistaSYMPTOMSThe WaitForMultipleObjects() function does not work correctly together with pseudohandles in Windows XP, in Windows Server 2003, or in Windows Vista. Consider the following sample code. WORKAROUNDTo work around this issue, use the DuplicateHandle() function to convert the pseudohandles to a real process handle. For example, use the following sample code. MORE INFORMATIONThis issue occurs because the pseudohandle is a special constant that is interpreted as the current thread or the process handle. The calling thread can use this handle to specify itself when a thread handle is required. These handles cannot be referred by other threads. A pseudohandle is always interpreted as referring to the thread that is using it.
The pseudohandle does not have to be closed when it is no longer needed. Calling the CloseHandle() function for this handle has no effect. A process uses the GetCurrentProcess() function or the GetCurrentHandle() function to obtain a handle to itself. This handle is a pseudohandle. However, the DuplicateHandle() function converts it to a real process handle. APPLIES TO
| Article Translations
|

Back to the top
