[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

LZCopy (Api)

This is the code, the filenames exists but when i try to copy from the compressed file to the normal file it doesn't work, the return from de lzcopy-command is oke (number of bytes copied) but the filesize of the new normal file is still 0 bytes
I think i'am doing something wrong when i close the normal file, can anybody help me ????

CFile = compressed file
NFile = the new to be uncompressed file

CFile.cBytes = 136
CFile.fFixedDisk = True
CFile.szPathName = strSrcName
hCFile = OpenFile(strSrcName, CFile, OF_READWRITE)
hCFile = LZInit(hCFile)
NFile.cBytes = 136
NFile.fFixedDisk = True
NFile.szPathName = "C:\temp\" & sFile.strDestName
hNFile = OpenFile("C:\temp\" & sFile.strDestName, NFile, OF_CREATE)
Ret = LZCopy(hCFile, hNFile)
LZClose (hCFile)
CloseHandle (hNFile)
0
DirkB
Asked:
DirkB
  • 2
1 Solution
 
mrmickCommented:
Microsoft Knowledge Base
Article ID: Q88257
Title: "How to Use LZCOPYFILE Function to Decompress or Copy Files"
http://premium.microsoft.com/support/kb/articles/q88/2/57.asp
Q88257
0
 
mrmickCommented:
Whoops, the FileAttr can't be used to retrieve a filehandle anymore...
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now