CStdioFile::Open

Overloaded. Open is designed for use with the default CStdioFile constructor.

virtual BOOL Open(
   LPCTSTR lpszFileName,
   UINT nOpenFlags,
   CFileException* pError = NULL
);
virtual BOOL Open(
   LPCTSTR lpszFileName,
   UINT nOpenFlags,
   CAtlTransactionManager* pTM,
   CFileException* pError = NULL
);

Parameters

  • lpszFileName
    A string that is the path to the desired file. The path can be relative or absolute.

  • nOpenFlags
    Sharing and access mode. Specifies the action to take when opening the file. You can combine options by using the bitwise-OR (|) operator. One access permission and one share option are required; the modeCreate and modeNoInherit modes are optional.

  • pError
    A pointer to an existing file-exception object that will receive the status of a failed operation.

  • pTM
    Pointer to a CAtlTransactionManager object.

Return Value

TRUE if successful; otherwise FALSE.

Requirements

Header: afx.h

See Also

Reference

CStdioFile Class