/*

Tau			[Physic engine]

			Emmanuel Julien 2004~2005.
			http://xbarr.ninomojo.com
			mailto:ejulien@nengine.fr
------------------------------------------

*/


#ifndef	__MMF_SYSTEM__
#define	__MMF_SYSTEM__



#include <TCHAR.H>
#include <windows.H>


/**
*/
class CMMF
{
public:
	CMMF(LPCTSTR MMFName, int size, LPCTSTR mutexName);
	~CMMF();
	void Read(void* pData, bool read = true);
	void Write(void* pData);
	LPVOID GetMMF() { return m_pSharedData; }

protected:
	LPVOID m_pSharedData;

private:
	CMMF() {}
	int m_nSize;
	HANDLE m_hFileMapping;
	HANDLE m_hMutex;
};


#endif	// __MMF_SYSTEM__
