CAtlFile::Create
Call this method to create or open a file.
HRESULT Create(
LPCTSTR szFilename,
DWORD dwDesiredAccess,
DWORD dwShareMode,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL,
LPSECURITY_ATTRIBUTES lpsa = NULL,
HANDLE hTemplateFile = NULL
) throw( );
Parameters
szFilename
The file name.dwDesiredAccess
The desired access. See dwDesiredAccess in CreateFile in the Windows SDK.dwShareMode
The share mode. See dwShareMode in CreateFile.dwCreationDisposition
The creation disposition. See dwCreationDisposition in CreateFile.dwFlagsAndAttributes
The flags and attributes. See dwFlagsAndAttributes in CreateFile.lpsa
The security attributes. See lpSecurityAttributes in CreateFile.hTemplateFile
The template file. See hTemplateFile in CreateFile.
Return Value
Returns S_OK on success, or an error HRESULT on failure.
Remarks
Calls CreateFile to create or open the file.
Requirements
Header: atlfile.h