Back to the WFC main page

CDataFile : CFile

$Revision: 14 $

Description

This class allows you handle the input and output of CDataChunk objects easily.

Data Members

None.

Methods

BOOL AddData( DWORD identifier, const CByteArray& data )
BOOL AddData( DWORD identifier, const BYTE * data, DWORD number_of_bytes )
BOOL AddData( const CDataChunk& data_chunk )
Sends the data chunk to the file.
BOOL GetData( DWORD& identifier, CByteArray& data )
BOOL GetData( CDataChunk& data_chunk )
Reads a data chunk from the file.

Example

#include <wfc.h>

void read_next_chunk( CDataFile& file, CDataChunk& data )
{
   WFCTRACEINIT( TEXT( "read_next_chunk()" ) );

   if ( file.GetData( data ) != FALSE )
   {
      _tprintf( TEXT( "Read %lu bytes\n" ), data.Data.GetSize() );
   }
}

Copyright, 2000, Samuel R. Blackburn
$Workfile: CDataFile.cpp $
$Modtime: 1/17/00 8:56a $