You may create your own wrapper, like this:
class CThread
{
private:
static DWORD WINAPI CThreadFunc(_In_ LPVOID lpParameter)
{ reinterpret_cast<CThread*>(lpParameter)->run();
return something;
}
protected:
virtual void run() = 0;
public:
void start()
{ DWORD dwThreadId;
CreateThread(NULL,0, CThreadFunc,(LPVOID)this,0,&dwThreadId);
}
}
After that, you can use your own threads
class CMyServerThread: public CThread
{
protected:
virtual void run()
{
}
public:
}
After that, you can use your own threads,
start like this:
CMyServerThread myServerThread;
myServerThread.start();