Misha Koshelev : kernel32: CreateThread returns NULL on error, not INVALID_HANDLE_VALUE.