Files
Client/Server/RylServerProject/BaseLibrary/Thread/Thread.h
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

35 lines
755 B
C++

#ifndef _CTHREAD_H_
#define _CTHREAD_H_
#include <winsock2.h>
#include <windows.h>
class CThread
{
public:
CThread() : m_hThreadHandle(INVALID_HANDLE_VALUE) { }
virtual ~CThread() { }
protected:
virtual unsigned int Run() = 0; // 실제 실행 되는 루프를 넣는다.
virtual BOOL End() = 0; // 루프가 끝날 수 있는 루틴을 넣는다.
typedef unsigned int(__stdcall *LPThreadFunc)(void*);
static inline unsigned int __stdcall ThreadFunc(void* pArg);
inline void SetHandle(HANDLE hHandle) { m_hThreadHandle = hHandle; }
inline HANDLE GetHandle() { return m_hThreadHandle; }
HANDLE m_hThreadHandle;
friend class CThreadMgr;
};
inline unsigned int __stdcall CThread::ThreadFunc(void* pArg)
{
return static_cast<CThread*>(pArg)->Run();
}
#endif