"Maarten Lankhorst" m.b.lankhorst@gmail.com writes:
FIXME("Waiting for %u to terminate\n", x);/* Make the thread return first */SetEvent(stream->packet_queued);if (WaitForSingleObject(stream->thread, 10000) == WAIT_TIMEOUT)exit(1);
Don't use exit(). If you absolutely need to kill the whole process you should use ExitProcess, and you have to print an error so that users know what happened. But I doubt you need such a drastic action here.