|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Visual Studio .NET 2003
Throws a file exception.
void AfxThrowFileException( int cause, LONG lOsError = -1, LPCTSTR lpszFileName = NULL );
- Specifies an integer that indicates the reason for the exception. For a list of the possible values, see CFileException::m_cause.
- Contains the operating-system error number (if available) that states the reason for the exception. See your operating-system manual for a listing of error codes.
- Points to a string containing the name of the file that caused the exception (if available).
You are responsible for determining the cause based on the operating-system error code.