- int i, id[NUM_THREADS];
-
- for (i = 0; i<NUM_THREADS; i++)
- {
- void *pData = &id[i];
- handles[i] = CreateThread(
- NULL, /* default security attributes */
- 0, /* use default stack size */
- ThreadProc, /* thread function */
- pData, /* argument to thread function */
- 0, /* use default creation flags */
- &dwThreadId[i]); /* returns the thread identifier */
- }
- WaitForMultipleObjects(NUM_THREADS, handles, TRUE, INFINITE);
- /* join */
- *seqp++ = '\0';
-}