呵呵,可以使用 WaitForMultipleObjects函数,定义如下:
DWORD WaitForMultipleObjects(
    DWORD nCount, // number of handles in the object handle array 
    CONST HANDLE *lpHandles, // pointer to the object-handle array 
    BOOL bWaitAll, // wait flag 
    DWORD dwMilliseconds  // time-out interval in milliseconds 
   );nCount为等待的线程数目
lpHandles为等待的线程Handle(是Handle不是线程ID)数组
将bWaitAll置为True,dwMilliseconds 置为INFINITE