Partager via


CAtlTemporaryFile::Create

Call this method to create a temporary file.

HRESULT Create(
   LPCTSTR pszDir = NULL,
   DWORD dwDesiredAccess = GENERIC_WRITE
) throw( );

Parameters

  • pszDir
    The path for the temporary file. If this is NULL, GetTempPath will be called to assign a path.

  • dwDesiredAccess
    The desired access. See dwDesiredAccess in CreateFile in the Windows SDK.

Return Value

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

Example

See the example for CAtlTemporaryFile::CAtlTemporaryFile.

Requirements

Header: atlfile.h

See Also

Reference

CAtlTemporaryFile Class

Other Resources

CAtlTemporaryFile Members