CDumpContext( CFile* pFile );
throw( CMemoryException, CFileException );
Parameters
pFile
A pointer to the CFile object that is the dump destination.
Remarks
Constructs an object of class CDumpContext. The afxDump object is constructed automatically.
Do not write to the underlying CFile while the dump context is active; otherwise, you will interfere with the dump. Under the Windows environment, the output is routed to the debugger via the Windows function OutputDebugString.
Example
//example for CDumpContext::CDumpContext
CFile f;
if( !f.Open( "dump.txt", CFile::modeCreate | CFile::modeWrite ) ) {
afxDump << "Unable to open file" << "\n";
exit( 1 );
}
CDumpContext dc( &f );