102 typedef DWORD ZRESULT;
106 #define ZIP_FILENAME 2 126 HZIP CreateZip(
void *z,
unsigned int len, DWORD flags);
169 ZRESULT ZipAdd(HZIP hz,
const TCHAR *dstzn,
void *src,
unsigned int len, DWORD flags);
195 DWORD GetZipSize(HZIP hz);
208 ZRESULT CloseZip(HZIP hz);
212 ZRESULT ZipGetMemory(HZIP hz,
void **buf,
unsigned long *len);
219 unsigned int FormatZipMessage(ZRESULT code,
char *buf,
unsigned int len);
227 #define ZR_OK 0x00000000 // nb. the pseudo-code zr-recent is never returned, 228 #define ZR_RECENT 0x00000001 // but can be passed to FormatZipMessage. 230 #define ZR_GENMASK 0x0000FF00 231 #define ZR_NODUPH 0x00000100 // couldn't duplicate the handle 232 #define ZR_NOFILE 0x00000200 // couldn't create/open the file 233 #define ZR_NOALLOC 0x00000300 // failed to allocate some resource 234 #define ZR_WRITE 0x00000400 // a general error writing to the file 235 #define ZR_NOTFOUND 0x00000500 // couldn't find that file in the zip 236 #define ZR_MORE 0x00000600 // there's still more data to be unzipped 237 #define ZR_CORRUPT 0x00000700 // the zipfile is corrupt or not a zipfile 238 #define ZR_READ 0x00000800 // a general error reading the file 240 #define ZR_CALLERMASK 0x00FF0000 241 #define ZR_ARGS 0x00010000 // general mistake with the arguments 242 #define ZR_NOTMMAP 0x00020000 // tried to ZipGetMemory, but that only works on mmap zipfiles, which yours wasn't 243 #define ZR_MEMSIZE 0x00030000 // the memory size is too small 244 #define ZR_FAILED 0x00040000 // the thing was already failed when you called this function 245 #define ZR_ENDED 0x00050000 // the zip creation has already been closed 246 #define ZR_MISSIZE 0x00060000 // the indicated input file size turned out mistaken 247 #define ZR_PARTIALUNZ 0x00070000 // the file had already been partially unzipped 248 #define ZR_ZMODE 0x00080000 // tried to mix creating/opening a zip 250 #define ZR_BUGMASK 0xFF000000 251 #define ZR_NOTINITED 0x01000000 // initialisation didn't work 252 #define ZR_SEEK 0x02000000 // trying to seek in an unseekable file 253 #define ZR_NOCHANGE 0x04000000 // changed its mind on storage, but not allowed 254 #define ZR_FLATE 0x05000000 // an internal error in the de/inflation code 322 HZIP CreateZipZ(
void *z,
unsigned int len,DWORD flags);
323 ZRESULT CloseZipZ(HZIP hz);
324 unsigned int FormatZipMessageZ(ZRESULT code,
char *buf,
unsigned int len);
325 bool IsZipHandleZ(HZIP hz);
326 #define CreateZip CreateZipZ 330 #define CloseZip(hz) (IsZipHandleZ(hz)?CloseZipZ(hz):CloseZipU(hz)) 332 #define CloseZip CloseZipZ 333 #define FormatZipMessage FormatZipMessageZ