ReactOS 0.4.15-dev-7942-gd23573b
fdi.h File Reference
#include <pshpack4.h>
#include <pshpack1.h>
#include <poppack.h>
Include dependency graph for fdi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ERF
 
struct  FDICABINETINFO
 
struct  FDIDECRYPT
 
struct  FDINOTIFICATION
 
struct  FDISPILLFILE
 

Macros

#define INCLUDED_TYPES_FCI_FDI   1
 
#define CB_MAX_CHUNK   32768U
 
#define CB_MAX_DISK   0x7fffffffL
 
#define CB_MAX_FILENAME   256
 
#define CB_MAX_CABINET_NAME   256
 
#define CB_MAX_CAB_PATH   256
 
#define CB_MAX_DISK_NAME   256
 
#define tcompMASK_TYPE   0x000F /* Mask for compression type */
 
#define tcompTYPE_NONE   0x0000 /* No compression */
 
#define tcompTYPE_MSZIP   0x0001 /* MSZIP */
 
#define tcompTYPE_QUANTUM   0x0002 /* Quantum */
 
#define tcompTYPE_LZX   0x0003 /* LZX */
 
#define tcompBAD   0x000F /* Unspecified compression type */
 
#define tcompMASK_LZX_WINDOW   0x1F00 /* Mask for LZX Compression Memory */
 
#define tcompLZX_WINDOW_LO   0x0F00 /* Lowest LZX Memory (15) */
 
#define tcompLZX_WINDOW_HI   0x1500 /* Highest LZX Memory (21) */
 
#define tcompSHIFT_LZX_WINDOW   8 /* Amount to shift over to get int */
 
#define tcompMASK_QUANTUM_LEVEL   0x00F0 /* Mask for Quantum Compression Level */
 
#define tcompQUANTUM_LEVEL_LO   0x0010 /* Lowest Quantum Level (1) */
 
#define tcompQUANTUM_LEVEL_HI   0x0070 /* Highest Quantum Level (7) */
 
#define tcompSHIFT_QUANTUM_LEVEL   4 /* Amount to shift over to get int */
 
#define tcompMASK_QUANTUM_MEM   0x1F00 /* Mask for Quantum Compression Memory */
 
#define tcompQUANTUM_MEM_LO   0x0A00 /* Lowest Quantum Memory (10) */
 
#define tcompQUANTUM_MEM_HI   0x1500 /* Highest Quantum Memory (21) */
 
#define tcompSHIFT_QUANTUM_MEM   8 /* Amount to shift over to get int */
 
#define tcompMASK_RESERVED   0xE000 /* Reserved bits (high 3 bits) */
 
#define CompressionTypeFromTCOMP(tc)    ((tc) & tcompMASK_TYPE)
 
#define CompressionLevelFromTCOMP(tc)    (((tc) & tcompMASK_QUANTUM_LEVEL) >> tcompSHIFT_QUANTUM_LEVEL)
 
#define CompressionMemoryFromTCOMP(tc)    (((tc) & tcompMASK_QUANTUM_MEM) >> tcompSHIFT_QUANTUM_MEM)
 
#define TCOMPfromTypeLevelMemory(t, l, m)
 
#define LZXCompressionWindowFromTCOMP(tc)    (((tc) & tcompMASK_LZX_WINDOW) >> tcompSHIFT_LZX_WINDOW)
 
#define TCOMPfromLZXWindow(w)
 
#define _A_NAME_IS_UTF   0x80
 
#define _A_EXEC   0x40
 
#define FNALLOC(fn)   void * __cdecl fn(ULONG cb)
 
#define FNFREE(fn)   void __cdecl fn(void *pv)
 
#define FNOPEN(fn)   INT_PTR __cdecl fn(char *pszFile, int oflag, int pmode)
 
#define FNREAD(fn)   UINT __cdecl fn(INT_PTR hf, void *pv, UINT cb)
 
#define FNWRITE(fn)   UINT __cdecl fn(INT_PTR hf, void *pv, UINT cb)
 
#define FNCLOSE(fn)   int __cdecl fn(INT_PTR hf)
 
#define FNSEEK(fn)   LONG __cdecl fn(INT_PTR hf, LONG dist, int seektype)
 
#define FNFDIDECRYPT(fn)   int __cdecl fn(PFDIDECRYPT pfdid)
 
#define FNFDINOTIFY(fn)
 
#define cpuUNKNOWN   (-1) /* FDI does detection */
 
#define cpu80286   (0) /* '286 opcodes only */
 
#define cpu80386   (1) /* '386 opcodes used */
 

Typedefs

typedef ULONG CHECKSUM
 
typedef ULONG UOFF
 
typedef ULONG COFF
 
typedef struct ERFPERF
 
typedef unsigned short TCOMP
 
typedef voidHFDI
 
typedef struct FDICABINETINFOPFDICABINETINFO
 
typedef struct FDIDECRYPTPFDIDECRYPT
 
typedef void *(__cdeclPFNALLOC) (ULONG cb)
 
typedef void(__cdeclPFNFREE) (void *pv)
 
typedef INT_PTR(__cdeclPFNOPEN) (char *pszFile, int oflag, int pmode)
 
typedef UINT(__cdeclPFNREAD) (INT_PTR hf, void *pv, UINT cb)
 
typedef UINT(__cdeclPFNWRITE) (INT_PTR hf, void *pv, UINT cb)
 
typedef int(__cdeclPFNCLOSE) (INT_PTR hf)
 
typedef LONG(__cdeclPFNSEEK) (INT_PTR hf, LONG dist, int seektype)
 
typedef int(__cdeclPFNFDIDECRYPT) (PFDIDECRYPT pfdid)
 
typedef struct FDINOTIFICATIONPFDINOTIFICATION
 
typedef INT_PTR(__cdeclPFNFDINOTIFY) (FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)
 
typedef struct FDISPILLFILEPFDISPILLFILE
 

Enumerations

enum  FDIERROR {
  FDIERROR_NONE , FDIERROR_CABINET_NOT_FOUND , FDIERROR_NOT_A_CABINET , FDIERROR_UNKNOWN_CABINET_VERSION ,
  FDIERROR_CORRUPT_CABINET , FDIERROR_ALLOC_FAIL , FDIERROR_BAD_COMPR_TYPE , FDIERROR_MDI_FAIL ,
  FDIERROR_TARGET_FILE , FDIERROR_RESERVE_MISMATCH , FDIERROR_WRONG_CABINET , FDIERROR_USER_ABORT
}
 
enum  FDIDECRYPTTYPE { fdidtNEW_CABINET , fdidtNEW_FOLDER , fdidtDECRYPT }
 
enum  FDINOTIFICATIONTYPE {
  fdintCABINET_INFO , fdintPARTIAL_FILE , fdintCOPY_FILE , fdintCLOSE_FILE_INFO ,
  fdintNEXT_CABINET , fdintENUMERATE
}
 

Functions

HFDI __cdecl FDICreate (PFNALLOC, PFNFREE, PFNOPEN, PFNREAD, PFNWRITE, PFNCLOSE, PFNSEEK, int, PERF)
 
BOOL __cdecl FDIIsCabinet (HFDI, INT_PTR, PFDICABINETINFO)
 
BOOL __cdecl FDICopy (HFDI, char *, char *, int, PFNFDINOTIFY, PFNFDIDECRYPT, void *pvUser)
 
BOOL __cdecl FDIDestroy (HFDI)
 
BOOL __cdecl FDITruncateCabinet (HFDI, char *, USHORT)
 

Macro Definition Documentation

◆ _A_EXEC

#define _A_EXEC   0x40

Definition at line 136 of file fdi.h.

◆ _A_NAME_IS_UTF

#define _A_NAME_IS_UTF   0x80

Definition at line 132 of file fdi.h.

◆ CB_MAX_CAB_PATH

#define CB_MAX_CAB_PATH   256

Definition at line 54 of file fdi.h.

◆ CB_MAX_CABINET_NAME

#define CB_MAX_CABINET_NAME   256

Definition at line 53 of file fdi.h.

◆ CB_MAX_CHUNK

#define CB_MAX_CHUNK   32768U

Definition at line 50 of file fdi.h.

◆ CB_MAX_DISK

#define CB_MAX_DISK   0x7fffffffL

Definition at line 51 of file fdi.h.

◆ CB_MAX_DISK_NAME

#define CB_MAX_DISK_NAME   256

Definition at line 55 of file fdi.h.

◆ CB_MAX_FILENAME

#define CB_MAX_FILENAME   256

Definition at line 52 of file fdi.h.

◆ CompressionLevelFromTCOMP

#define CompressionLevelFromTCOMP (   tc)     (((tc) & tcompMASK_QUANTUM_LEVEL) >> tcompSHIFT_QUANTUM_LEVEL)

Definition at line 90 of file fdi.h.

◆ CompressionMemoryFromTCOMP

#define CompressionMemoryFromTCOMP (   tc)     (((tc) & tcompMASK_QUANTUM_MEM) >> tcompSHIFT_QUANTUM_MEM)

Definition at line 93 of file fdi.h.

◆ CompressionTypeFromTCOMP

#define CompressionTypeFromTCOMP (   tc)     ((tc) & tcompMASK_TYPE)

Definition at line 87 of file fdi.h.

◆ cpu80286

#define cpu80286   (0) /* '286 opcodes only */

Definition at line 270 of file fdi.h.

◆ cpu80386

#define cpu80386   (1) /* '386 opcodes used */

Definition at line 271 of file fdi.h.

◆ cpuUNKNOWN

#define cpuUNKNOWN   (-1) /* FDI does detection */

Definition at line 269 of file fdi.h.

◆ FNALLOC

#define FNALLOC (   fn)    void * __cdecl fn(ULONG cb)

Definition at line 203 of file fdi.h.

◆ FNCLOSE

#define FNCLOSE (   fn)    int __cdecl fn(INT_PTR hf)

Definition at line 218 of file fdi.h.

◆ FNFDIDECRYPT

#define FNFDIDECRYPT (   fn)    int __cdecl fn(PFDIDECRYPT pfdid)

Definition at line 224 of file fdi.h.

◆ FNFDINOTIFY

#define FNFDINOTIFY (   fn)
Value:
#define __cdecl
Definition: accygwin.h:79
FDINOTIFICATIONTYPE
Definition: fdi.h:246
int32_t INT_PTR
Definition: typedefs.h:64
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159

Definition at line 257 of file fdi.h.

◆ FNFREE

#define FNFREE (   fn)    void __cdecl fn(void *pv)

Definition at line 206 of file fdi.h.

◆ FNOPEN

#define FNOPEN (   fn)    INT_PTR __cdecl fn(char *pszFile, int oflag, int pmode)

Definition at line 209 of file fdi.h.

◆ FNREAD

#define FNREAD (   fn)    UINT __cdecl fn(INT_PTR hf, void *pv, UINT cb)

Definition at line 212 of file fdi.h.

◆ FNSEEK

#define FNSEEK (   fn)    LONG __cdecl fn(INT_PTR hf, LONG dist, int seektype)

Definition at line 221 of file fdi.h.

◆ FNWRITE

#define FNWRITE (   fn)    UINT __cdecl fn(INT_PTR hf, void *pv, UINT cb)

Definition at line 215 of file fdi.h.

◆ INCLUDED_TYPES_FCI_FDI

#define INCLUDED_TYPES_FCI_FDI   1

Definition at line 29 of file fdi.h.

◆ LZXCompressionWindowFromTCOMP

#define LZXCompressionWindowFromTCOMP (   tc)     (((tc) & tcompMASK_LZX_WINDOW) >> tcompSHIFT_LZX_WINDOW)

Definition at line 101 of file fdi.h.

◆ tcompBAD

#define tcompBAD   0x000F /* Unspecified compression type */

Definition at line 66 of file fdi.h.

◆ TCOMPfromLZXWindow

#define TCOMPfromLZXWindow (   w)
Value:
#define tcompTYPE_LZX
Definition: fdi.h:65
#define tcompSHIFT_LZX_WINDOW
Definition: fdi.h:71
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102

Definition at line 104 of file fdi.h.

◆ TCOMPfromTypeLevelMemory

#define TCOMPfromTypeLevelMemory (   t,
  l,
  m 
)
Value:
( t ))
r l[0]
Definition: byte_order.h:168
#define tcompSHIFT_QUANTUM_LEVEL
Definition: fdi.h:76
#define tcompSHIFT_QUANTUM_MEM
Definition: fdi.h:81
GLdouble GLdouble t
Definition: gl.h:2047
const GLfloat * m
Definition: glext.h:10848

Definition at line 96 of file fdi.h.

◆ tcompLZX_WINDOW_HI

#define tcompLZX_WINDOW_HI   0x1500 /* Highest LZX Memory (21) */

Definition at line 70 of file fdi.h.

◆ tcompLZX_WINDOW_LO

#define tcompLZX_WINDOW_LO   0x0F00 /* Lowest LZX Memory (15) */

Definition at line 69 of file fdi.h.

◆ tcompMASK_LZX_WINDOW

#define tcompMASK_LZX_WINDOW   0x1F00 /* Mask for LZX Compression Memory */

Definition at line 68 of file fdi.h.

◆ tcompMASK_QUANTUM_LEVEL

#define tcompMASK_QUANTUM_LEVEL   0x00F0 /* Mask for Quantum Compression Level */

Definition at line 73 of file fdi.h.

◆ tcompMASK_QUANTUM_MEM

#define tcompMASK_QUANTUM_MEM   0x1F00 /* Mask for Quantum Compression Memory */

Definition at line 78 of file fdi.h.

◆ tcompMASK_RESERVED

#define tcompMASK_RESERVED   0xE000 /* Reserved bits (high 3 bits) */

Definition at line 83 of file fdi.h.

◆ tcompMASK_TYPE

#define tcompMASK_TYPE   0x000F /* Mask for compression type */

Definition at line 61 of file fdi.h.

◆ tcompQUANTUM_LEVEL_HI

#define tcompQUANTUM_LEVEL_HI   0x0070 /* Highest Quantum Level (7) */

Definition at line 75 of file fdi.h.

◆ tcompQUANTUM_LEVEL_LO

#define tcompQUANTUM_LEVEL_LO   0x0010 /* Lowest Quantum Level (1) */

Definition at line 74 of file fdi.h.

◆ tcompQUANTUM_MEM_HI

#define tcompQUANTUM_MEM_HI   0x1500 /* Highest Quantum Memory (21) */

Definition at line 80 of file fdi.h.

◆ tcompQUANTUM_MEM_LO

#define tcompQUANTUM_MEM_LO   0x0A00 /* Lowest Quantum Memory (10) */

Definition at line 79 of file fdi.h.

◆ tcompSHIFT_LZX_WINDOW

#define tcompSHIFT_LZX_WINDOW   8 /* Amount to shift over to get int */

Definition at line 71 of file fdi.h.

◆ tcompSHIFT_QUANTUM_LEVEL

#define tcompSHIFT_QUANTUM_LEVEL   4 /* Amount to shift over to get int */

Definition at line 76 of file fdi.h.

◆ tcompSHIFT_QUANTUM_MEM

#define tcompSHIFT_QUANTUM_MEM   8 /* Amount to shift over to get int */

Definition at line 81 of file fdi.h.

◆ tcompTYPE_LZX

#define tcompTYPE_LZX   0x0003 /* LZX */

Definition at line 65 of file fdi.h.

◆ tcompTYPE_MSZIP

#define tcompTYPE_MSZIP   0x0001 /* MSZIP */

Definition at line 63 of file fdi.h.

◆ tcompTYPE_NONE

#define tcompTYPE_NONE   0x0000 /* No compression */

Definition at line 62 of file fdi.h.

◆ tcompTYPE_QUANTUM

#define tcompTYPE_QUANTUM   0x0002 /* Quantum */

Definition at line 64 of file fdi.h.

Typedef Documentation

◆ CHECKSUM

typedef ULONG CHECKSUM

Definition at line 35 of file fdi.h.

◆ COFF

typedef ULONG COFF

Definition at line 38 of file fdi.h.

◆ HFDI

typedef void* HFDI

Definition at line 141 of file fdi.h.

◆ PERF

typedef struct ERF * PERF

◆ PFDICABINETINFO

◆ PFDIDECRYPT

◆ PFDINOTIFICATION

◆ PFDISPILLFILE

◆ PFNALLOC

typedef void *(__cdecl * PFNALLOC) (ULONG cb)

Definition at line 202 of file fdi.h.

◆ PFNCLOSE

typedef int(__cdecl * PFNCLOSE) (INT_PTR hf)

Definition at line 217 of file fdi.h.

◆ PFNFDIDECRYPT

typedef int(__cdecl * PFNFDIDECRYPT) (PFDIDECRYPT pfdid)

Definition at line 223 of file fdi.h.

◆ PFNFDINOTIFY

typedef INT_PTR(__cdecl * PFNFDINOTIFY) (FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin)

Definition at line 255 of file fdi.h.

◆ PFNFREE

typedef void(__cdecl * PFNFREE) (void *pv)

Definition at line 205 of file fdi.h.

◆ PFNOPEN

typedef INT_PTR(__cdecl * PFNOPEN) (char *pszFile, int oflag, int pmode)

Definition at line 208 of file fdi.h.

◆ PFNREAD

typedef UINT(__cdecl * PFNREAD) (INT_PTR hf, void *pv, UINT cb)

Definition at line 211 of file fdi.h.

◆ PFNSEEK

typedef LONG(__cdecl * PFNSEEK) (INT_PTR hf, LONG dist, int seektype)

Definition at line 220 of file fdi.h.

◆ PFNWRITE

typedef UINT(__cdecl * PFNWRITE) (INT_PTR hf, void *pv, UINT cb)

Definition at line 214 of file fdi.h.

◆ TCOMP

typedef unsigned short TCOMP

Definition at line 59 of file fdi.h.

◆ UOFF

typedef ULONG UOFF

Definition at line 37 of file fdi.h.

Enumeration Type Documentation

◆ FDIDECRYPTTYPE

Enumerator
fdidtNEW_CABINET 
fdidtNEW_FOLDER 
fdidtDECRYPT 

Definition at line 158 of file fdi.h.

158 {
159 fdidtNEW_CABINET, /* New cabinet */
160 fdidtNEW_FOLDER, /* New folder */
161 fdidtDECRYPT, /* Decrypt a data block */
FDIDECRYPTTYPE
Definition: fdi.h:158
@ fdidtNEW_CABINET
Definition: fdi.h:159
@ fdidtNEW_FOLDER
Definition: fdi.h:160
@ fdidtDECRYPT
Definition: fdi.h:161

◆ FDIERROR

Enumerator
FDIERROR_NONE 
FDIERROR_CABINET_NOT_FOUND 
FDIERROR_NOT_A_CABINET 
FDIERROR_UNKNOWN_CABINET_VERSION 
FDIERROR_CORRUPT_CABINET 
FDIERROR_ALLOC_FAIL 
FDIERROR_BAD_COMPR_TYPE 
FDIERROR_MDI_FAIL 
FDIERROR_TARGET_FILE 
FDIERROR_RESERVE_MISMATCH 
FDIERROR_WRONG_CABINET 
FDIERROR_USER_ABORT 

Definition at line 114 of file fdi.h.

114 {
127} FDIERROR;
FDIERROR
Definition: fdi.h:114
@ FDIERROR_USER_ABORT
Definition: fdi.h:126
@ FDIERROR_CORRUPT_CABINET
Definition: fdi.h:119
@ FDIERROR_RESERVE_MISMATCH
Definition: fdi.h:124
@ FDIERROR_BAD_COMPR_TYPE
Definition: fdi.h:121
@ FDIERROR_UNKNOWN_CABINET_VERSION
Definition: fdi.h:118
@ FDIERROR_WRONG_CABINET
Definition: fdi.h:125
@ FDIERROR_NONE
Definition: fdi.h:115
@ FDIERROR_ALLOC_FAIL
Definition: fdi.h:120
@ FDIERROR_NOT_A_CABINET
Definition: fdi.h:117
@ FDIERROR_MDI_FAIL
Definition: fdi.h:122
@ FDIERROR_TARGET_FILE
Definition: fdi.h:123
@ FDIERROR_CABINET_NOT_FOUND
Definition: fdi.h:116

◆ FDINOTIFICATIONTYPE

Enumerator
fdintCABINET_INFO 
fdintPARTIAL_FILE 
fdintCOPY_FILE 
fdintCLOSE_FILE_INFO 
fdintNEXT_CABINET 
fdintENUMERATE 

Definition at line 246 of file fdi.h.

246 {
247 fdintCABINET_INFO, /* General information about cabinet */
248 fdintPARTIAL_FILE, /* First file in cabinet is continuation */
249 fdintCOPY_FILE, /* File to be copied */
250 fdintCLOSE_FILE_INFO, /* Close the file, set relevant info */
251 fdintNEXT_CABINET, /* File continued to next cabinet */
252 fdintENUMERATE, /* Enumeration status */
@ fdintCABINET_INFO
Definition: fdi.h:247
@ fdintCOPY_FILE
Definition: fdi.h:249
@ fdintPARTIAL_FILE
Definition: fdi.h:248
@ fdintCLOSE_FILE_INFO
Definition: fdi.h:250
@ fdintNEXT_CABINET
Definition: fdi.h:251
@ fdintENUMERATE
Definition: fdi.h:252

Function Documentation

◆ FDICopy()

BOOL __cdecl FDICopy ( HFDI  hfdi,
char pszCabinet,
char pszCabPath,
int  flags,
PFNFDINOTIFY  pfnfdin,
PFNFDIDECRYPT  pfnfdid,
void pvUser 
)

Definition at line 2431 of file fdi.c.

2439{
2440 FDICABINETINFO fdici;
2441 FDINOTIFICATION fdin;
2442 INT_PTR cabhf, filehf = 0;
2443 unsigned int i;
2444 char fullpath[MAX_PATH];
2445 size_t pathlen, filenamelen;
2446 char emptystring = '\0';
2447 cab_UBYTE buf[64];
2448 struct fdi_folder *fol = NULL, *linkfol = NULL;
2449 struct fdi_file *file = NULL, *linkfile = NULL;
2450 fdi_decomp_state *decomp_state;
2451 FDI_Int *fdi = get_fdi_ptr( hfdi );
2452
2453 TRACE("(hfdi == ^%p, pszCabinet == %s, pszCabPath == %s, flags == %x, "
2454 "pfnfdin == ^%p, pfnfdid == ^%p, pvUser == ^%p)\n",
2455 hfdi, debugstr_a(pszCabinet), debugstr_a(pszCabPath), flags, pfnfdin, pfnfdid, pvUser);
2456
2457 if (!fdi) return FALSE;
2458
2459 if (!(decomp_state = fdi->alloc(sizeof(fdi_decomp_state))))
2460 {
2462 return FALSE;
2463 }
2464 ZeroMemory(decomp_state, sizeof(fdi_decomp_state));
2465
2466 pathlen = pszCabPath ? strlen(pszCabPath) : 0;
2467 filenamelen = pszCabinet ? strlen(pszCabinet) : 0;
2468
2469 /* slight overestimation here to save CPU cycles in the developer's brain */
2470 if ((pathlen + filenamelen + 3) > MAX_PATH) {
2471 ERR("MAX_PATH exceeded.\n");
2472 fdi->free(decomp_state);
2474 return FALSE;
2475 }
2476
2477 /* paste the path and filename together */
2478 fullpath[0] = '\0';
2479 if (pathlen)
2480 strcpy(fullpath, pszCabPath);
2481 if (filenamelen)
2482 strcat(fullpath, pszCabinet);
2483
2484 TRACE("full cab path/file name: %s\n", debugstr_a(fullpath));
2485
2486 /* get a handle to the cabfile */
2487 cabhf = fdi->open(fullpath, _O_RDONLY|_O_BINARY, _S_IREAD | _S_IWRITE);
2488 if (cabhf == -1) {
2489 fdi->free(decomp_state);
2492 return FALSE;
2493 }
2494
2495 /* check if it's really a cabfile. Note that this doesn't implement the bug */
2496 if (!FDI_read_entries(fdi, cabhf, &fdici, &(CAB(mii)))) {
2497 WARN("FDI_read_entries failed: %u\n", fdi->perf->erfOper);
2498 fdi->free(decomp_state);
2499 fdi->close(cabhf);
2500 return FALSE;
2501 }
2502
2503 /* cabinet notification */
2504 ZeroMemory(&fdin, sizeof(FDINOTIFICATION));
2505 fdin.setID = fdici.setID;
2506 fdin.iCabinet = fdici.iCabinet;
2507 fdin.pv = pvUser;
2508 fdin.psz1 = (CAB(mii).nextname) ? CAB(mii).nextname : &emptystring;
2509 fdin.psz2 = (CAB(mii).nextinfo) ? CAB(mii).nextinfo : &emptystring;
2510 fdin.psz3 = pszCabPath;
2511
2512 if (pfnfdin(fdintCABINET_INFO, &fdin) == -1) {
2513 set_error( fdi, FDIERROR_USER_ABORT, 0 );
2514 goto bail_and_fail;
2515 }
2516
2517 CAB(setID) = fdici.setID;
2518 CAB(iCabinet) = fdici.iCabinet;
2519 CAB(cabhf) = cabhf;
2520
2521 /* read folders */
2522 for (i = 0; i < fdici.cFolders; i++) {
2523 if (fdi->read(cabhf, buf, cffold_SIZEOF) != cffold_SIZEOF) {
2525 goto bail_and_fail;
2526 }
2527
2528 if (CAB(mii).folder_resv > 0)
2529 fdi->seek(cabhf, CAB(mii).folder_resv, SEEK_CUR);
2530
2531 fol = fdi->alloc(sizeof(struct fdi_folder));
2532 if (!fol) {
2533 ERR("out of memory!\n");
2535 goto bail_and_fail;
2536 }
2537 ZeroMemory(fol, sizeof(struct fdi_folder));
2538 if (!CAB(firstfol)) CAB(firstfol) = fol;
2539
2543
2544 if (linkfol)
2545 linkfol->next = fol;
2546 linkfol = fol;
2547 }
2548
2549 /* read files */
2550 for (i = 0; i < fdici.cFiles; i++) {
2551 if (fdi->read(cabhf, buf, cffile_SIZEOF) != cffile_SIZEOF) {
2553 goto bail_and_fail;
2554 }
2555
2556 file = fdi->alloc(sizeof(struct fdi_file));
2557 if (!file) {
2558 ERR("out of memory!\n");
2560 goto bail_and_fail;
2561 }
2562 ZeroMemory(file, sizeof(struct fdi_file));
2563 if (!CAB(firstfile)) CAB(firstfile) = file;
2564
2571 file->filename = FDI_read_string(fdi, cabhf, fdici.cbCabinet);
2572
2573 if (!file->filename) {
2575 goto bail_and_fail;
2576 }
2577
2578 if (linkfile)
2579 linkfile->next = file;
2580 linkfile = file;
2581 }
2582
2583 for (file = CAB(firstfile); (file); file = file->next) {
2584
2585 /*
2586 * FIXME: This implementation keeps multiple cabinet files open at once
2587 * when encountering a split cabinet. It is a quirk of this implementation
2588 * that sometimes we decrypt the same block of data more than once, to find
2589 * the right starting point for a file, moving the file-pointer backwards.
2590 * If we kept a cache of certain file-pointer information, we could eliminate
2591 * that behavior... in fact I am not sure that the caching we already have
2592 * is not sufficient.
2593 *
2594 * The current implementation seems to work fine in straightforward situations
2595 * where all the cabinet files needed for decryption are simultaneously
2596 * available. But presumably, the API is supposed to support cabinets which
2597 * are split across multiple CDROMS; we may need to change our implementation
2598 * to strictly serialize its file usage so that it opens only one cabinet
2599 * at a time. Some experimentation with Windows is needed to figure out the
2600 * precise semantics required. The relevant code is here and in fdi_decomp().
2601 */
2602
2603 /* partial-file notification */
2605 /*
2606 * FIXME: Need to create a Cabinet with a single file spanning multiple files
2607 * and perform some tests to figure out the right behavior. The SDK says
2608 * FDICopy will notify the user of the filename and "disk name" (info) of
2609 * the cabinet where the spanning file /started/.
2610 *
2611 * That would certainly be convenient for the API-user, who could abort,
2612 * everything (or parallelize, if that's allowed (it is in wine)), and call
2613 * FDICopy again with the provided filename, so as to avoid partial file
2614 * notification and successfully unpack. This task could be quite unpleasant
2615 * from wine's perspective: the information specifying the "start cabinet" for
2616 * a file is associated nowhere with the file header and is not to be found in
2617 * the cabinet header. We have only the index of the cabinet wherein the folder
2618 * begins, which contains the file. To find that cabinet, we must consider the
2619 * index of the current cabinet, and chain backwards, cabinet-by-cabinet (for
2620 * each cabinet refers to its "next" and "previous" cabinet only, like a linked
2621 * list).
2622 *
2623 * Bear in mind that, in the spirit of CABINET.DLL, we must assume that any
2624 * cabinet other than the active one might be at another filepath than the
2625 * current one, or on another CDROM. This could get rather dicey, especially
2626 * if we imagine parallelized access to the FDICopy API.
2627 *
2628 * The current implementation punts -- it just returns the previous cabinet and
2629 * its info from the header of this cabinet. This provides the right answer in
2630 * 95% of the cases; it's worth checking if Microsoft cuts the same corner before
2631 * we "fix" it.
2632 */
2633 ZeroMemory(&fdin, sizeof(FDINOTIFICATION));
2634 fdin.pv = pvUser;
2635 fdin.psz1 = (char *)file->filename;
2636 fdin.psz2 = (CAB(mii).prevname) ? CAB(mii).prevname : &emptystring;
2637 fdin.psz3 = (CAB(mii).previnfo) ? CAB(mii).previnfo : &emptystring;
2638
2639 if (pfnfdin(fdintPARTIAL_FILE, &fdin) == -1) {
2640 set_error( fdi, FDIERROR_USER_ABORT, 0 );
2641 goto bail_and_fail;
2642 }
2643 /* I don't think we are supposed to decompress partial files. This prevents it. */
2644 file->oppressed = TRUE;
2645 }
2646 if (file->oppressed) {
2647 filehf = 0;
2648 } else {
2649 ZeroMemory(&fdin, sizeof(FDINOTIFICATION));
2650 fdin.pv = pvUser;
2651 fdin.psz1 = (char *)file->filename;
2652 fdin.cb = file->length;
2653 fdin.date = file->date;
2654 fdin.time = file->time;
2655 fdin.attribs = file->attribs;
2656 fdin.iFolder = file->index;
2657 if ((filehf = ((*pfnfdin)(fdintCOPY_FILE, &fdin))) == -1) {
2658 set_error( fdi, FDIERROR_USER_ABORT, 0 );
2659 filehf = 0;
2660 goto bail_and_fail;
2661 }
2662 }
2663
2664 /* find the folder for this file if necc. */
2665 if (filehf) {
2666 fol = CAB(firstfol);
2668 /* pick the last folder */
2669 while (fol->next) fol = fol->next;
2670 } else {
2671 unsigned int i2;
2672
2673 for (i2 = 0; (i2 < file->index); i2++)
2674 if (fol->next) /* bug resistance, should always be true */
2675 fol = fol->next;
2676 }
2677 }
2678
2679 if (filehf) {
2680 cab_UWORD comptype = fol->comp_type;
2681 int ct1 = comptype & cffoldCOMPTYPE_MASK;
2682 int ct2 = CAB(current) ? (CAB(current)->comp_type & cffoldCOMPTYPE_MASK) : 0;
2683 int err = 0;
2684
2685 TRACE("Extracting file %s as requested by callee.\n", debugstr_a(file->filename));
2686
2687 /* set up decomp_state */
2688 CAB(fdi) = fdi;
2689 CAB(filehf) = filehf;
2690
2691 /* Was there a change of folder? Compression type? Did we somehow go backwards? */
2692 if ((ct1 != ct2) || (CAB(current) != fol) || (file->offset < CAB(offset))) {
2693
2694 TRACE("Resetting folder for file %s.\n", debugstr_a(file->filename));
2695
2696 /* free stuff for the old decompressor */
2697 switch (ct2) {
2698 case cffoldCOMPTYPE_LZX:
2699 if (LZX(window)) {
2700 fdi->free(LZX(window));
2701 LZX(window) = NULL;
2702 }
2703 break;
2705 if (QTM(window)) {
2706 fdi->free(QTM(window));
2707 QTM(window) = NULL;
2708 }
2709 break;
2710 }
2711
2712 CAB(decomp_cab) = NULL;
2713 CAB(fdi)->seek(CAB(cabhf), fol->offset, SEEK_SET);
2714 CAB(offset) = 0;
2715 CAB(outlen) = 0;
2716
2717 /* initialize the new decompressor */
2718 switch (ct1) {
2720 CAB(decompress) = NONEfdi_decomp;
2721 break;
2723 CAB(decompress) = ZIPfdi_decomp;
2724 break;
2726 CAB(decompress) = QTMfdi_decomp;
2727 err = QTMfdi_init((comptype >> 8) & 0x1f, (comptype >> 4) & 0xF, decomp_state);
2728 break;
2729 case cffoldCOMPTYPE_LZX:
2730 CAB(decompress) = LZXfdi_decomp;
2731 err = LZXfdi_init((comptype >> 8) & 0x1f, decomp_state);
2732 break;
2733 default:
2735 }
2736 }
2737
2738 CAB(current) = fol;
2739
2740 switch (err) {
2741 case DECR_OK:
2742 break;
2743 case DECR_NOMEMORY:
2745 goto bail_and_fail;
2746 default:
2748 goto bail_and_fail;
2749 }
2750
2751 if (file->offset > CAB(offset)) {
2752 /* decode bytes and send them to /dev/null */
2753 switch (fdi_decomp(file, 0, decomp_state, pszCabPath, pfnfdin, pvUser)) {
2754 case DECR_OK:
2755 break;
2756 case DECR_USERABORT:
2757 set_error( fdi, FDIERROR_USER_ABORT, 0 );
2758 goto bail_and_fail;
2759 case DECR_NOMEMORY:
2761 goto bail_and_fail;
2762 default:
2764 goto bail_and_fail;
2765 }
2766 CAB(offset) = file->offset;
2767 }
2768
2769 /* now do the actual decompression */
2770 err = fdi_decomp(file, 1, decomp_state, pszCabPath, pfnfdin, pvUser);
2771 if (err) CAB(current) = NULL; else CAB(offset) += file->length;
2772
2773 /* fdintCLOSE_FILE_INFO notification */
2774 ZeroMemory(&fdin, sizeof(FDINOTIFICATION));
2775 fdin.pv = pvUser;
2776 fdin.psz1 = (char *)file->filename;
2777 fdin.hf = filehf;
2778 fdin.cb = (file->attribs & cffile_A_EXEC) != 0; /* FIXME: is that right? */
2779 fdin.date = file->date;
2780 fdin.time = file->time;
2781 fdin.attribs = file->attribs; /* FIXME: filter _A_EXEC? */
2782 fdin.iFolder = file->index;
2783 ((*pfnfdin)(fdintCLOSE_FILE_INFO, &fdin));
2784 filehf = 0;
2785
2786 switch (err) {
2787 case DECR_OK:
2788 break;
2789 case DECR_USERABORT:
2790 set_error( fdi, FDIERROR_USER_ABORT, 0 );
2791 goto bail_and_fail;
2792 case DECR_NOMEMORY:
2794 goto bail_and_fail;
2795 default:
2797 goto bail_and_fail;
2798 }
2799 }
2800 }
2801
2802 if (fol) free_decompression_temps(fdi, fol, decomp_state);
2803 free_decompression_mem(fdi, decomp_state);
2804
2805 return TRUE;
2806
2807 bail_and_fail: /* here we free ram before error returns */
2808
2809 if (fol) free_decompression_temps(fdi, fol, decomp_state);
2810
2811 if (filehf) fdi->close(filehf);
2812
2813 free_decompression_mem(fdi, decomp_state);
2814
2815 return FALSE;
2816}
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define WARN(fmt,...)
Definition: debug.h:112
#define ERR(fmt,...)
Definition: debug.h:110
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
UINT16 cab_UWORD
Definition: mszip.h:26
unsigned char cab_UBYTE
Definition: mszip.h:25
#define cffile_Attribs
Definition: cabinet.h:92
#define cffoldCOMPTYPE_MSZIP
Definition: cabinet.h:102
#define _O_BINARY
Definition: cabinet.h:51
#define cffold_NumBlocks
Definition: cabinet.h:84
#define cffile_Time
Definition: cabinet.h:91
#define cffold_SIZEOF
Definition: cabinet.h:86
#define cffile_SIZEOF
Definition: cabinet.h:93
#define cffileCONTINUED_FROM_PREV
Definition: cabinet.h:108
#define cffile_A_EXEC
Definition: cabinet.h:115
#define cffile_FolderOffset
Definition: cabinet.h:88
#define cffile_FolderIndex
Definition: cabinet.h:89
#define _O_RDONLY
Definition: cabinet.h:37
#define cffoldCOMPTYPE_LZX
Definition: cabinet.h:104
#define cffoldCOMPTYPE_MASK
Definition: cabinet.h:100
#define cffoldCOMPTYPE_QUANTUM
Definition: cabinet.h:103
#define cffile_Date
Definition: cabinet.h:90
#define cffileCONTINUED_TO_NEXT
Definition: cabinet.h:109
#define cffile_UncompressedSize
Definition: cabinet.h:87
UINT32 cab_off_t
Definition: cabinet.h:62
#define cffoldCOMPTYPE_NONE
Definition: cabinet.h:101
#define cffold_DataOffset
Definition: cabinet.h:83
#define cffold_CompType
Definition: cabinet.h:85
#define _S_IWRITE
Definition: cabinet.h:33
#define _S_IREAD
Definition: cabinet.h:34
static char * FDI_read_string(FDI_Int *fdi, INT_PTR hf, long cabsize)
Definition: fdi.c:476
static int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
Definition: fdi.c:1606
static FDI_Int * get_fdi_ptr(HFDI hfdi)
Definition: fdi.c:195
static void set_error(FDI_Int *fdi, int oper, int err)
Definition: fdi.c:187
static int NONEfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
Definition: fdi.c:852
#define DECR_USERABORT
Definition: fdi.c:185
static BOOL FDI_read_entries(FDI_Int *fdi, INT_PTR hf, PFDICABINETINFO pfdici, PMORE_ISCAB_INFO pmii)
Definition: fdi.c:532
static int QTMfdi_init(int window, int level, fdi_decomp_state *decomp_state)
Definition: fdi.c:739
static void free_decompression_temps(FDI_Int *fdi, const struct fdi_folder *fol, fdi_decomp_state *decomp_state)
Definition: fdi.c:2217
#define EndGetI16(a)
Definition: fdi.c:172
static int LZXfdi_init(int window, fdi_decomp_state *decomp_state)
Definition: fdi.c:791
#define LZX(x)
Definition: fdi.c:177
#define CAB(x)
Definition: fdi.c:174
#define EndGetI32(a)
Definition: fdi.c:171
#define DECR_OK
Definition: fdi.c:178
static int ZIPfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
Definition: fdi.c:1406
static int QTMfdi_decomp(int inlen, int outlen, fdi_decomp_state *decomp_state)
Definition: fdi.c:1434
#define DECR_DATAFORMAT
Definition: fdi.c:179
#define DECR_NOMEMORY
Definition: fdi.c:181
static void free_decompression_mem(FDI_Int *fdi, fdi_decomp_state *decomp_state)
Definition: fdi.c:2236
static int fdi_decomp(const struct fdi_file *fi, int savemode, fdi_decomp_state *decomp_state, char *pszCabPath, PFNFDINOTIFY pfnfdin, void *pvUser)
Definition: fdi.c:1938
#define QTM(x)
Definition: fdi.c:176
#define SetLastError(x)
Definition: compat.h:752
#define MAX_PATH
Definition: compat.h:34
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLbitfield flags
Definition: glext.h:7161
GLintptr offset
Definition: glext.h:5920
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define SEEK_SET
Definition: jmemansi.c:26
#define debugstr_a
Definition: kernel32.h:31
if(dx< 0)
Definition: linetemp.h:194
struct task_struct * current
Definition: linux.c:32
#define SEEK_CUR
Definition: util.h:63
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
static IHTMLWindow2 * window
Definition: events.c:77
#define err(...)
#define TRACE(s)
Definition: solgame.cpp:4
int erfOper
Definition: fci.h:45
USHORT setID
Definition: fdi.h:149
USHORT iCabinet
Definition: fdi.h:150
USHORT cFiles
Definition: fdi.h:148
USHORT cFolders
Definition: fdi.h:147
LONG cbCabinet
Definition: fdi.h:146
USHORT setID
Definition: fdi.h:239
USHORT iCabinet
Definition: fdi.h:240
char * psz3
Definition: fdi.h:230
char * psz2
Definition: fdi.h:229
USHORT time
Definition: fdi.h:236
void * pv
Definition: fdi.h:231
USHORT iFolder
Definition: fdi.h:241
INT_PTR hf
Definition: fdi.h:233
char * psz1
Definition: fdi.h:228
USHORT date
Definition: fdi.h:235
USHORT attribs
Definition: fdi.h:237
LONG cb
Definition: fdi.h:227
Definition: mszip.h:30
PFNOPEN open
Definition: fdi.c:118
PFNCLOSE close
Definition: fdi.c:121
PERF perf
Definition: mszip.h:39
PFNFREE free
Definition: fdi.c:117
PFNSEEK seek
Definition: fdi.c:122
PFNALLOC alloc
Definition: fdi.c:116
PFNREAD read
Definition: fdi.c:119
Definition: fdi.c:78
Definition: fdi.c:89
cab_UWORD comp_type
Definition: fdi.c:92
struct fdi_folder * next
Definition: fdi.c:90
cab_UWORD num_blocks
Definition: fdi.c:95
cab_off_t offset
Definition: fdi.c:91
Definition: fci.c:127
cab_ULONG offset
Definition: fci.c:130
cab_UWORD date
Definition: fci.c:132
cab_UWORD attribs
Definition: fci.c:134
cab_UWORD time
Definition: fci.c:133
#define ZeroMemory
Definition: winbase.h:1712

Referenced by Extract(), extract_cabinet(), extract_cabinet_stream(), and test_FDICopy().

◆ FDICreate()

HFDI __cdecl FDICreate ( PFNALLOC  pfnalloc,
PFNFREE  pfnfree,
PFNOPEN  pfnopen,
PFNREAD  pfnread,
PFNWRITE  pfnwrite,
PFNCLOSE  pfnclose,
PFNSEEK  pfnseek,
int  cpuType,
PERF  perf 
)

Definition at line 412 of file fdi.c.

422{
423 FDI_Int *fdi;
424
425 TRACE("(pfnalloc == ^%p, pfnfree == ^%p, pfnopen == ^%p, pfnread == ^%p, pfnwrite == ^%p, "
426 "pfnclose == ^%p, pfnseek == ^%p, cpuType == %d, perf == ^%p)\n",
427 pfnalloc, pfnfree, pfnopen, pfnread, pfnwrite, pfnclose, pfnseek,
428 cpuType, perf);
429
430 if ((!pfnalloc) || (!pfnfree)) {
431 perf->erfOper = FDIERROR_NONE;
433 perf->fError = TRUE;
434
436 return NULL;
437 }
438
439 if (!((fdi = pfnalloc(sizeof(FDI_Int))))) {
441 perf->erfType = 0;
442 perf->fError = TRUE;
443 return NULL;
444 }
445
446 fdi->magic = FDI_INT_MAGIC;
447 fdi->alloc = pfnalloc;
448 fdi->free = pfnfree;
449 fdi->open = pfnopen;
450 fdi->read = pfnread;
451 fdi->write = pfnwrite;
452 fdi->close = pfnclose;
453 fdi->seek = pfnseek;
454 /* no-brainer: we ignore the cpu type; this is only used
455 for the 16-bit versions in Windows anyhow... */
456 fdi->perf = perf;
457
458 return (HFDI)fdi;
459}
#define FDI_INT_MAGIC
Definition: fdi.c:126
int erfType
Definition: fci.h:46
BOOL fError
Definition: fci.h:47
PFNWRITE write
Definition: fdi.c:120
unsigned int magic
Definition: fdi.c:115
#define ERROR_BAD_ARGUMENTS
Definition: winerror.h:232

Referenced by Extract(), extract_cabinet(), extract_cabinet_stream(), test_FDICopy(), test_FDICreate(), test_FDIDestroy(), and test_FDIIsCabinet().

◆ FDIDestroy()

BOOL __cdecl FDIDestroy ( HFDI  hfdi)

Definition at line 2831 of file fdi.c.

2832{
2833 FDI_Int *fdi = get_fdi_ptr( hfdi );
2834
2835 TRACE("(hfdi == ^%p)\n", hfdi);
2836 if (!fdi) return FALSE;
2837 fdi->magic = 0; /* paranoia */
2838 fdi->free(fdi);
2839 return TRUE;
2840}

Referenced by Extract(), extract_cabinet(), extract_cabinet_stream(), test_FDICopy(), test_FDICreate(), test_FDIDestroy(), and test_FDIIsCabinet().

◆ FDIIsCabinet()

BOOL __cdecl FDIIsCabinet ( HFDI  hfdi,
INT_PTR  hf,
PFDICABINETINFO  pfdici 
)

Definition at line 696 of file fdi.c.

697{
698 BOOL rv;
699 FDI_Int *fdi = get_fdi_ptr( hfdi );
700
701 TRACE("(hfdi == ^%p, hf == ^%ld, pfdici == ^%p)\n", hfdi, hf, pfdici);
702
703 if (!fdi) return FALSE;
704
705 if (!pfdici) {
707 return FALSE;
708 }
709 rv = FDI_read_entries(fdi, hf, pfdici, NULL);
710
711 if (rv)
712 pfdici->hasnext = FALSE; /* yuck. duplicate apparent cabinet.dll bug */
713
714 return rv;
715}
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL hasnext
Definition: fdi.h:153

Referenced by test_FDICopy(), and test_FDIIsCabinet().

◆ FDITruncateCabinet()

BOOL __cdecl FDITruncateCabinet ( HFDI  hfdi,
char pszCabinetName,
USHORT  iFolderToDelete 
)

Definition at line 2861 of file fdi.c.

2865{
2866 FDI_Int *fdi = get_fdi_ptr( hfdi );
2867
2868 FIXME("(hfdi == ^%p, pszCabinetName == %s, iFolderToDelete == %hu): stub\n",
2869 hfdi, debugstr_a(pszCabinetName), iFolderToDelete);
2870
2871 if (!fdi) return FALSE;
2872
2874 return FALSE;
2875}
#define FIXME(fmt,...)
Definition: debug.h:111
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102