class memStream
{
private:

	LPVOID			stream;
	DWORD			size;
	DWORD			curentPos;

public:

	memStream() : stream(NULL), size(0), curentPos(0)
	{
	}

	~memStream()
	{
		delete stream;
	}

	BOOL CreateFromFile( TCHAR* name );
	BOOL CreateFromResource( TCHAR* name );

	memStream& operator>>( BYTE& b );
	memStream& operator>>( WORD& w );
	memStream& operator>>( DWORD& dw );
	memStream& operator>>( FLOAT& f );

	DWORD Size();
	DWORD CurrentPos();
	BOOL Seek( DWORD seekFlag, DWORD pos );
}


