int StartThread(void* arg) { CThread * thread = static_cast<CThread*>(arg); return thread->DoExecute(); }