Partager via


CDocument::ReleaseFile

This member function is called by the framework to release a file, making it available for use by other applications.

virtual void ReleaseFile(
   CFile* pFile,
   BOOL bAbort 
);

Parameters

  • pFile
    A pointer to the CFile object to be released.

  • bAbort
    Specifies whether the file is to be released by using either CFile::Close or CFile::Abort. FALSE if the file is to be released using CFile::Close; TRUE if the file is to be released using CFile::Abort.

Remarks

If bAbort is TRUE, ReleaseFile calls CFile::Abort, and the file is released. CFile::Abort will not throw an exception.

If bAbort is FALSE, ReleaseFile calls CFile::Close and the file is released.

Override this member function to require an action by the user before the file is released.

Requirements

Header: afxwin.h

See Also

Concepts

CDocument Class

CDocument Members

Hierarchy Chart

CDocTemplate Class

CFile::Close

CFile::Abort