Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CFileException::ThrowOsError

 

Throws a CFileException corresponding to a given lOsError value. If the error code is unknown, then the function throws an exception coded as CFileException::generic.


      static void PASCAL ThrowOsError(
   LONG lOsError,
   LPCTSTR lpszFileName = NULL 
);

lOsError

An operating-system-specific error code.

lpszFileName

A pointer to the string containing the name of the file that caused the exception, if available.

Example

CFileException::ThrowOsError(ERROR_ACCESS_DENIED);  // "access denied"         

Requirements

Header: afx.h

Show: