#ifndef _COMMON_PUREPROCESS_HPP_
#define _COMMON_PUREPROCESS_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#endif

#if !defined(__FLAT__)
struct PROCESS_INFORMATION
{
	HANDLE hProcess;
	HANDLE hThread;
	DWORD dwProcessId;
  DWORD dwThreadId;
};
#endif

class PureProcess : private PROCESS_INFORMATION
{
public:
	PureProcess(void);
	virtual ~PureProcess();
	operator HANDLE(void)const;
	HANDLE getThread(void)const;
  HANDLE getProcess(void)const;
	DWORD getProcessID(void)const;
	DWORD getThreadID(void)const;
protected:
	void setThread(HANDLE handleThread);
	void setProcess(HANDLE handleProcess);
	void setProcessID(DWORD processID);
	void setThreadID(DWORD threadID);
private:
};

inline
PureProcess::PureProcess(void)
{
	PROCESS_INFORMATION::hProcess=0;
	PROCESS_INFORMATION::hThread=0;
	PROCESS_INFORMATION::dwProcessId=0;
  PROCESS_INFORMATION::dwThreadId=0;
}

inline
PureProcess::~PureProcess()
{
}

inline
PureProcess::operator HANDLE(void)const
{
	return hProcess;
}

inline
HANDLE PureProcess::getThread(void)const
{
	return hThread;
}

inline
void PureProcess::setThread(HANDLE handleThread)
{
	hThread=handleThread;
}

inline
HANDLE PureProcess::getProcess(void)const
{
	return hProcess;
}

inline
void PureProcess::setProcess(HANDLE handleProcess)
{
	hProcess=handleProcess;
}

inline
DWORD PureProcess::getProcessID(void)const
{
	return dwProcessId;
}

inline
void PureProcess::setProcessID(DWORD processID)
{
	dwProcessId=processID;
}

inline
DWORD PureProcess::getThreadID(void)const
{
	return dwThreadId;
}

inline
void PureProcess::setThreadID(DWORD threadID)
{
	dwThreadId=threadID;
}
#endif
