[delphizip] Re: Problem using ExtractFileToStream

  • From: "Trueman, Christopher" <ctrueman@xxxxxxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Fri, 6 Oct 2006 03:34:47 -0700

The original ZIP is 4.5MB.  The contained ZIP is 2K when extracted with
WinZip 10.

The original file and the contained files are, I'm pretty sure, just a
Java JAR formatted file which I understood was built on the ZIP format.


I have DelZip179.DLL.

Here's the contents from one of the log files created:

DelZip_Dll Error Log=20
UNZIP
0       trace is on, function=3DUnzDllExec
0       Trace: ready to setup
0       Trace: FSetUpToProcessZipFile
0       Time Hour 10, min 31, sec 26 msec 78
0       Trace: argc =3D 1, process_all_files =3D 0
0       Using DelZip.dll version 1.79.5.1 Apr 29 2006
0       Trace: In process_zipfiles
0       Trace: two
0       Trace: four in process.c - ready to dowild
0       Trace: starting do_seekable
0       Trace: do_seekable, loc 2
0       Trace: open_input_file;
fname=3DC:\dev\icnputils\ScaAnalyzer\sca\EPBC05_0-10003473.SCA
0       Trace: zip file
C:\dev\icnputils\ScaAnalyzer\sca\EPBC05_0-10003473.SCA opened OK
0       Trace: do_seekable, loc 3
0       Trace: do_seekable, loc 4
0       Trace: in find_ecrec (end of central dir)
0       Trace: Found end-of-central-dir signature at offset 4652378
(0046FD5Ah)
0       Trace:     from beginning of file; offset 32090 (7D5Ah) within
block
0       Trace: do_seekable, loc 5
0       Trace: do_seekable, loc 6
0       Trace: do_seekable, loc 7
0       Trace: about to extract/list files (error =3D 0)
0       Trace: in extract_or_test_files
0       Trace: members_remaining =3D 11, unmatched fspecs =3D 1
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
20
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len 9
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
24
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
57
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: Matched
BUILDARCHIVES/sap.com~com.sap.pcd.dbschema~_comp~dcia.zip
0       Trace: starting main loop
0       Trace: New iter: members_remaining after this pass =3D 10
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
20
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: New iter: members_remaining after this pass =3D 9
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len 9
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: New iter: members_remaining after this pass =3D 8
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
24
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: New iter: members_remaining after this pass =3D 7
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
57
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: file is OK:
BUILDARCHIVES/sap.com~com.sap.pcd.dbschema~_comp~dcia.zip
0       Trace: New iter: members_remaining after this pass =3D 6
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
62
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: New iter: members_remaining after this pass =3D 5
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
69
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: New iter: members_remaining after this pass =3D 4
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
40
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: New iter: members_remaining after this pass =3D 3
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
39
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: New iter: members_remaining after this pass =3D 2
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
44
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: New iter: members_remaining after this pass =3D 1
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
51
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       Trace: New iter: members_remaining after this pass =3D 0
0       Trace: in process_cdir_file_hdr()
0       Trace: in get_cdir_ent
0       Trace: End of get_cdir_ent in process.c. Found filename of len
26
0       Trace: Good entry; hostnum of file =3D 0
0       Trace: process_cdir_file_hdr returning PK_COOL
0       Trace: back in extract_or_test_files
0       DLL expects to extract 1 files
0       Trace: starting second loop - THIS TIME we take action.
0       Trace: loc A: request =3D 810, inbuf_offset =3D 810
0       Trace: bufstart !=3D cur_zipfile_bufstart
0       Trace: about to process local file hdr
0       Trace: process_local_file_hdr of process.c found fname len of 57
0       Read local filename
BUILDARCHIVES/sap.com~com.sap.pcd.dbschema~_comp~dcia.zip
0       Trace: in extract.c, about to call decrypt
0       Trace: Start extract_or_test_member:
BUILDARCHIVES/sap.com~com.sap.pcd.dbschema~_comp~dcia.zip
0       Trace: initializing pG->crc32val to 00000000
0       Trace: error occured while extracting or testing
0       Trace: jump back in central dir to where we were
0       Trace: done with big outer block
0       Trace: filnum =3D 1
0       Trace: Done with extract/list files (error =3D 50)
0       Trace: after do_seekable, warn=3D0   missdir=3D0  missfi=3D0  =
losefi=3D1
winfi=3D0
0       Trace: do_seekable(0) returns 50 (see unzpriv.h, PK_*)
0       Trace: five in process.c
0       Trace: six
0       file(s) not found
0       Trace: seven
0       Trace: checkdir of win32.c
0       Trace: *** BACK FROM CALL TO process_zipfiles ***
0       Files acted on =3D 0
0       Time Hour 10, min 31, sec 26 msec 921=20

> -----Original Message-----
> From: delphizip-bounce@xxxxxxxxxxxxx=20
> [mailto:delphizip-bounce@xxxxxxxxxxxxx] On Behalf Of R.Peters
> Sent: 06 October 2006 11:10
> To: delphizip@xxxxxxxxxxxxx
> Subject: [delphizip] Re: Problem using ExtractFileToStream
>=20
> what size is the file you are trying to extract into memory stream?
> What dll version (don't remember any problems in earlier=20
> versions but ...).
> I think you said that the file would extract normally You can=20
> get a better trace report by putting the following file
> (DelZip179.ini) in the same directory as the dll [ZIP] Level=20
> =3D 3 [UNZIP] Level =3D 2 with a bit of luck the log file it=20
> creates will give a bit more information
> - Russell Peters
>=20
> Trueman, Christopher wrote:
> > I replaced all occurrences of '/' with '\' in the filename before=20
> > passing it to ExtractFileToStream.  Still getting nil returned. =20
> > Here's the trace output:
> >
> > Trace: starting second loop - THIS TIME we take action.
> > Trace: loc A: request =3D3D 810, inbuf_offset =3D3D 810
> > Trace: bufstart !=3D3D cur_zipfile_bufstart
> > Trace: about to process local file hdr
> > Trace: process_local_file_hdr of process.c found fname len=20
> of 57 Read=20
> > local filename=20
> > BUILDARCHIVES\sap.com~com.sap.pcd.dbschema~_comp~dcia.zip
> > Trace: in extract.c, about to call decrypt
> > Trace: Start extract_or_test_member:
> > BUILDARCHIVES\sap.com~com.sap.pcd.dbschema~_comp~dcia.zip
> > Trace: initializing pG->crc32val to 00000000
> > Trace: error occured while extracting or testing
> > Trace: jump back in central dir to where we were
> > Trace: done with big outer block
> > Trace: filnum =3D3D 1
> > Trace: Done with extract\list files (error =3D3D 50)
> >
> >
> >
> > Chris.
> >
> >  =20
> >> I works for me IF the correct path delimiters are used \ not /
> >> - Russell Peters
> >>    =20
> >
> > <snip>
> >
> > _______________________________________________________
> > The contents of this e-mail are intended for the named=20
> addressee only.=20
> > =3D It contains information that may be confidential. Unless=20
> you are the=20
> > named addressee or an authorized designee, you may not copy=20
> or use it,=20
> > or =3D disclose it to anyone else. If you received it in error =
please=20
> > notify the sender=3D20 immediately, and then destroy it.
> >
> > -----------
> > To unsubscribe from this list, send an empty e-mail message to:
> >   delphizip-request@xxxxxxxxxxxxx
> > and put the word unsubscribe in the subject.
> >
> >
> >  =20
>=20
>=20
> -- Attached file included as plaintext by Ecartis --
> -- File: DelZip179.ini
>=20
> [ZIP]
> Level =3D 3
> [UNZIP]
> Level =3D 2
>=20
>=20
>=20
> -----------
> To unsubscribe from this list, send an empty e-mail message to:
>   delphizip-request@xxxxxxxxxxxxx
> and put the word unsubscribe in the subject.
>=20
-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: