I am working on some legacy code which includes calls to WaitForMultipleObjects(). From school I remember the function WaitForMultipleObjectsEx() (which we only vaguely mentioned). I am wondering what, if at all, is the difference and is there a general rule as to when to use which. Googling the title of the question didn’t lead to any conclusions.
I am working on some legacy code which includes calls to WaitForMultipleObjects() . From
Share
As already stated, the routines with the addded “Ex” usually have some extended functionality of the original function. In this case there is an extra boolean parameter “bAlertable”. The difference here is that this extra parameter, if set to true, allows you to wait on, not only objects in a signaled state and time-outs but also I/O completions and user-mode asynchronous procedure calls. This added feature lets you make your own completion routines for reads and writes. If you don’t need the extra feature just call this function with the bAlertable parameter set to FALSE, or you can just use the older version without the parameter.