Partager via


CAtlTemporaryFile::Close

Call this method to close a temporary file and either delete its contents or store them under the specified file name.

HRESULT Close( 
   LPCTSTR szNewName = NULL  
) throw( );

Parameters

  • szNewName
    The name for the new file to store the contents of the temporary file in. If this argument is NULL, the contents of the temporary file are deleted.

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

CAtlTemporaryFile::HandsOff

CAtlTemporaryFile::Create