CFile::CFile

This constructor constructs a CFile object. The default constructor does not open a file, but rather sets m_hFile to CFile::hFileNull. Because this constructor does not throw an exception, it does not make sense to use TRY/CATCH logic. Use the Open method, then test directly for exception conditions.

At a Glance

Header file: Afx.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

CFile( );

CFile( int hFile );

CFile( LPCTSTR lpszFileName, UINT nOpenFlags );
throw( CFileException );