ITsVISTA
Information that makes life easier when it comes to installing, managing, and using Windows Vista.
Start About FAQ Blogroll Shop

ITsVISTA KB-Link: KB951322

The WaitForMultipleObjects() function does not work correctly with pseudohandles in Windows XP, in Windows Server 2003, or in Windows Vista

The 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.

int _tmain(int argc, _TCHAR* argv[])
{
      
      HANDLE hnd[1]; 
	long res; 
	hnd[0] = GetCurrentProcess(); 

        res = WaitForMultipleObjects(1, hnd, FALSE, 3000);
      return 0;
}

After you run the sample code, you expect the function to return after three seconds. However, it returns a “WAIT_FAILED” error, and it does not wait.

For more information on this issue, including potential causes, workarounds, and resolutions, see: Microsoft KB Article KB951322.

Get notified of new posts for FREE via RSS or E-mail

Subscribe to ITsVISTA!

Related Posts