Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Aug 2004
Offline Last Active Feb 16 2016 04:57 AM

#544654 WaitForMultipleObjects Problem!

Posted by on 17 August 2009 - 10:45 AM

Hi All I have a strange problem with WaitForMultipleObjects. If I try and do a wait on multiple objects with the line:
DWORD status = WaitForMultipleObjects(mDoneEvents.size(), &mDoneEvents[0], TRUE, INFINITE);
I get WAIT_FAILED returned with and Error of 87 Parameter Incorrect. The vector of HANDLE's is valid and if I do a WaitForSingleObject on each member of mDoneEvents all works fine, also if I set the bwaitAll flag to FALSE ie:
DWORD status = WaitForMultipleObjects(mDoneEvents.size(), &mDoneEvents[0], FALSE, INFINITE);
Then it works just fine, problem is I need the waitall to be TRUE, does anyone have any idea what I may have done wrong here? Many thanks Chris