mirror of
https://github.com/x64dbg/xdbg.git
synced 2026-11-09 14:01:25 -10:00
38 lines
432 B
C++
38 lines
432 B
C++
#pragma once
|
|
|
|
class Thread
|
|
{
|
|
public:
|
|
Thread(void);
|
|
virtual ~Thread(void);
|
|
|
|
virtual bool init()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
virtual long run() = 0;
|
|
|
|
virtual void final(int result)
|
|
{
|
|
|
|
}
|
|
|
|
bool start(size_t stackSize = 0);
|
|
void stop(int exitCode = 0);
|
|
|
|
void wait();
|
|
|
|
int getId() const
|
|
{
|
|
return _threadId;
|
|
}
|
|
|
|
protected:
|
|
static DWORD __stdcall threadProc(void* param);
|
|
|
|
protected:
|
|
DWORD _threadId;
|
|
HANDLE _threadHandle;
|
|
};
|