#include <lzexpand.h> |
void LZClose(hf) | |||||
HFILE hf; | /* handle of file to be closed | */ |
The LZClose function closes a file that was opened by the LZOpenFile or OpenFile function.
hf
Identifies the source file.
This function does not return a value.
If the file was compressed by Microsoft File Compression Utility (COMPRESS.EXE) and opened by the LZOpenFile function, LZClose frees any global heap space that was required to expand the file.
The following example uses LZClose to close a file opened by LZOpenFile:
char szSrc[] = {"readme.txt"};
char szDst[] = {"readme.bak"};
OFSTRUCT ofStrSrc;
OFSTRUCT ofStrDest;
HFILE hfSrcFile, hfDstFile;
/* Open the source file. */
hfSrcFile = LZOpenFile(szSrc, &ofStrSrc, OF_READ);
/* Create the destination file. */
hfDstFile = LZOpenFile(szDst, &ofStrDest, OF_CREATE);
/* Copy the source file to the destination file. */
LZCopy(hfSrcFile, hfDstFile);
/* Close the files. */
LZClose(hfSrcFile);
LZClose(hfDstFile);