SECCompressFile::Open
BOOLSECCompressFile::Open(LPCTSTRlpszFileName, UINTnOpenFlags, CFileException*pException= NULL, intnCompLevel= -1)
Opens a SECCompressFile with the specified pathname.
Defined in: compfile.cpp
Return Value
Nonzero if the open was successful; otherwise 0. The p parameter is meaningful only if 0 is returned.
Parameters
lpszFileName
A string that is the path to the desired file. The path may be relative or absolute.
nOpenFlags
Sharing and access mode. Specifies the action to take when opening the file. Note: modeReadWrite is mapped to modeWrite. ModeReadWrite is not supported by the compression code.
Comments
Open is designed for use with the default SECCompressFile constructor. The two functions form a "safe" method for opening a file where a failure is a normal, expected condition. The constructor is guaranteed to succeed, and Open returns a pointer to an exception object, bypassing the THROW/TRY/CATCH mechanism.
pException
A pointer to an existing file-exception object that indicates the completion status of the open operation.
nCompLevel
Desired compression level \n Must be -1 or between 1 (fastest) and 9 (best compression). \n -1 gives Z_DEFAULT_COMPRESSION, a compromise in speed and size (approx. 6).
See Also