Поделиться через


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( );

Параметры

  • 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.

Возвращаемое значение

Returns S_OK on success, or an error HRESULT on failure.

Заметки

Calls CreateFile to create or open the file.

Требования

Header: atlfile.h

См. также

Основные понятия

CAtlFile Class

CAtlFile Members