use a standards based thread object not _beginthreadex