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

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

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


BOOL memStream::CreateFromFile( TCHAR* name )
{
	FILE*		inFile = fopen( name, "rb" );

	if( !inFile )
	{
		fclose( inFile );
		return FALSE;
	}

	if( fseek( inFile, 0, SEEK_END ) )
	{
		fclose( inFile );
		return FALSE;
	}

	size = ftell( inFile );

	if( size < 0 )
	{
		fclose( inFile );
		return FALSE;
	}

	stream = new BYTE[size];

	if( fseek( inFile, 0, SEEK_SET ) )
	{
		fclose( inFile );
		return FALSE;
	}

	if( fread( stream, 1, size, inFile ) < size )
	{
		fclose( inFile );
		return FALSE;
	}

	fclose( inFile );
	return TRUE;
}

BOOL memStream::CreateFromResource( TCHAR* name )
{
