Added the linked list with the name of files of the CAB archive.
This commit is contained in:
parent
6cf101c1b3
commit
3f5fada764
|
@ -2564,6 +2564,7 @@ BOOL process_cabinet(LPCSTR cabname, LPCSTR dir, BOOL fix, BOOL lower, EXTRACTde
|
|||
{
|
||||
struct cabinet *basecab, *cab, *cab1, *cab2;
|
||||
struct cab_file *filelist, *fi;
|
||||
struct ExtractFileList **destlistptr = &(dest->filelist);
|
||||
|
||||
/* The first result of a search will be returned, and
|
||||
* the remaining results will be chained to it via the cab->next structure
|
||||
|
@ -2632,6 +2633,16 @@ BOOL process_cabinet(LPCSTR cabname, LPCSTR dir, BOOL fix, BOOL lower, EXTRACTde
|
|||
strlen(dest->directory) ? dest->directory : "",
|
||||
strlen(dest->directory) ? "\\": "",
|
||||
fi->filename);
|
||||
*destlistptr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
||||
sizeof(struct ExtractFileList));
|
||||
if(*destlistptr) {
|
||||
(*destlistptr)->unknown = TRUE; /* FIXME: were do we get the value? */
|
||||
(*destlistptr)->filename = HeapAlloc(GetProcessHeap(), 0, (
|
||||
strlen(fi->filename)+1));
|
||||
if((*destlistptr)->filename)
|
||||
lstrcpyA((*destlistptr)->filename, fi->filename);
|
||||
destlistptr = &((*destlistptr)->next);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -553,11 +553,17 @@ static const cab_UWORD Zipmask[17] = {
|
|||
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff \
|
||||
}
|
||||
|
||||
struct ExtractFileList {
|
||||
LPSTR filename;
|
||||
struct ExtractFileList *next;
|
||||
BOOL unknown; /* always 1L */
|
||||
} ;
|
||||
|
||||
/* the first parameter of the function extract */
|
||||
typedef struct {
|
||||
long result1; /* 0x000 */
|
||||
long unknown1[3]; /* 0x004 */
|
||||
long result2; /* 0x010 */
|
||||
struct ExtractFileList *filelist; /* 0x010 */
|
||||
long filecount; /* 0x014 */
|
||||
long unknown2; /* 0x018 */
|
||||
char directory[0x104]; /* 0x01c */
|
||||
|
|
|
@ -76,8 +76,10 @@ HRESULT WINAPI CABINET_DllGetVersion (DLLVERSIONINFO *pdvi)
|
|||
* dest pointer to a buffer of 0x32c bytes containing
|
||||
* [I] - number with value 1 at index 0x18
|
||||
* - the dest path starting at index 0x1c
|
||||
* [O] - the number of files inside the CAB file at index 0x14
|
||||
* - the name of the last file with dest path at idx 0x12
|
||||
* [O] - a linked list with the filename existing inside the
|
||||
* CAB file at idx 0x10
|
||||
* - the number of files inside the CAB file at index 0x14
|
||||
* - the name of the last file with dest path at idx 0x120
|
||||
* what [I] char* describing what to uncompress, I guess.
|
||||
*
|
||||
* RETURNS
|
||||
|
@ -114,6 +116,7 @@ HRESULT WINAPI Extract(EXTRACTdest *dest, LPCSTR what)
|
|||
if (!dir) return E_OUTOFMEMORY;
|
||||
lstrcpyA(dir, dest->directory);
|
||||
dest->filecount=0;
|
||||
dest->filelist = NULL;
|
||||
|
||||
TRACE("extracting to dir: %s\n", debugstr_a(dir));
|
||||
|
||||
|
@ -121,15 +124,6 @@ HRESULT WINAPI Extract(EXTRACTdest *dest, LPCSTR what)
|
|||
if (!process_cabinet(what, dir, FALSE, FALSE, dest))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
/* the magic 13 is returned by all cab files tested so far:
|
||||
* DXDDEX.CAB, DXMINI.CAB, SWFLASH.CAB on win2k
|
||||
* but it crashes the ie5.5 installer :-( . The native dll does not return
|
||||
* the four zeros. The value depends on the combination of the cab file and
|
||||
* the destination path. It appears to be a pointer to an optional return struct.
|
||||
* The IE6 installer derefs this value + 4. Contents currently unknown.
|
||||
*/
|
||||
dest->result2 = 0;
|
||||
|
||||
LocalFree(dir);
|
||||
|
||||
TRACE("filecount %08lx,lastfile %s\n",
|
||||
|
|
Loading…
Reference in New Issue