1. undefined OS_WINDOWS
2. instread of CreateThread with _beginthreadex