HANDLE hThread = NULL; ... goto EXIT; ... hThread = CreateThread(NULL, 0, ServiceWorkerThread, NULL, 0, NULL);