text: CMemoryFile()
  DWORD Size
  void Close( void )
  BOOL Flush( void )
  ULONGLONG GetFileLength( void ) const
  void GetFilename( CString& filename ) const
  filenameis empty, no file has been opened.
  DWORD GetLength( void ) const
  void * GetPointer( void ) const
  BOOL Open( LPCTSTR filename, UINT open_flags = CFile::modeRead, DWORD beginning_at = 0, DWORD number_of_bytes_to_map, void * desired_address = NULL ) BOOL Open( LPCTSTR filename, UINT open_flags = CFile::modeRead, ULONGLONG beginning_at = 0, DWORD number_of_bytes_to_map, void * desired_address = NULL )
  beginning_atvalue be a special value (like in the call to the
  MapViewOfFile()API). The other parameters have these meanings:
  open_flags- May be one of the following values:
  CFile::modeRead- Open the file for read only
  CFile::modeWrite- Open the file for read/write
  CFile::modeReadWrite- Open the file for read/write
  beginning_at- The offset into the file of where to start mapping.
  number_of_bytes_to_map- The number of bytes to map. If this parameter is zero, the default is to compute the number of bytes that were mapped. You can call GetLength() to find out how many bytes were mapped.
  desired_address- This is where you ask nicely that the address returned by GetPointer() be this value. Win32 may or may not be able to map the bytes in the file to
  desired_address. Never count on
  desired_addressactually being used.
  #include <wfc.h> #pragma hdrstop void test_CMemoryFile( void ) { WFCTRACEINIT( TEXT( "test_CMemoryFile()" ) ); CMemoryFile memory_mapped_file; BYTE * pointer = NULL; if ( memory_mapped_file.Open( TEXT( "datafile.dat" ) ) == FALSE ) { return; } pointer = (BYTE *) memory_mapped_file.GetPointer(); _tprintf( TEXT( "The last byte of the file is %X\n" ), pointer[ mempory_mapped_file.GetLength() - 1 ] ); }