Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

650 lines
23 KiB

  1. /*** types.h - Common defines for FCI/FDI stuff -- goes into FCI/FDI.H
  2. *
  3. * Microsoft Confidential
  4. * Copyright (C) Microsoft Corporation 1993-1994
  5. * All Rights Reserved.
  6. *
  7. * History:
  8. * 03-Mar-1993 chuckst Merged from other files
  9. * 08-Mar-1994 bens Changed symbol to control recursive include
  10. * 09-Mar-1994 bens Cleanups for RESERVE modifications
  11. * 16-Mar-1994 bens Nuke padlong()
  12. * 21-Mar-1994 bens Spruce up comments
  13. * 22-Mar-1994 bens Add BIT16 test so we can build 16 or 32 bit!
  14. * 26-May-1994 bens Added Quantum compression definitions
  15. * 30-Jul-1997 msliger Correct CB_MAX_DISK from 7FFFFFF to 7FFFFFFF.
  16. */
  17. #ifndef INCLUDED_TYPES_FCI_FDI
  18. #define INCLUDED_TYPES_FCI_FDI 1
  19. #ifdef __cplusplus
  20. extern "C" { /* Assume C declarations for C++ */
  21. #endif /* __cplusplus */
  22. //** Define away for 32-bit (NT/Chicago) build
  23. #ifndef HUGE
  24. #define HUGE
  25. #endif
  26. #ifndef FAR
  27. #define FAR
  28. #endif
  29. #ifndef DIAMONDAPI
  30. #define DIAMONDAPI __cdecl
  31. #endif
  32. //** Specify structure packing explicitly for clients of FDI
  33. #ifndef _WIN64
  34. #include <pshpack4.h>
  35. #endif
  36. //** Don't redefine types defined in Win16 WINDOWS.H (_INC_WINDOWS)
  37. // or Win32 WINDOWS.H (_WINDOWS_)
  38. //
  39. #if !defined(_INC_WINDOWS) && !defined(_WINDOWS_)
  40. typedef int BOOL; /* f */
  41. typedef unsigned char BYTE; /* b */
  42. typedef unsigned int UINT; /* ui */
  43. typedef unsigned short USHORT; /* us */
  44. typedef unsigned long ULONG; /* ul */
  45. #endif // _INC_WINDOWS
  46. typedef unsigned long CHECKSUM; /* csum */
  47. typedef unsigned long UOFF; /* uoff - uncompressed offset */
  48. typedef unsigned long COFF; /* coff - cabinet file offset */
  49. #ifndef TRUE
  50. #define TRUE 1
  51. #endif
  52. #ifndef FALSE
  53. #define FALSE 0
  54. #endif
  55. #ifndef NULL
  56. #define NULL 0
  57. #endif
  58. /*** ERF - Error structure
  59. *
  60. * This structure returns error information from FCI/FDI. The caller should
  61. * not modify this structure.
  62. */
  63. typedef struct {
  64. int erfOper; // FCI/FDI error code -- see FDIERROR_XXX
  65. // and FCIERR_XXX equates for details.
  66. int erfType; // Optional error value filled in by FCI/FDI.
  67. // For FCI, this is usually the C run-time
  68. // *errno* value.
  69. BOOL fError; // TRUE => error present
  70. } ERF; /* erf */
  71. typedef ERF FAR *PERF; /* perf */
  72. #ifdef _DEBUG
  73. // don't hide statics from map during debugging
  74. #define STATIC
  75. #else // !DEBUG
  76. #define STATIC static
  77. #endif // !DEBUG
  78. #define CB_MAX_CHUNK 32768U
  79. #define CB_MAX_DISK 0x7fffffffL
  80. #define CB_MAX_FILENAME 256
  81. #define CB_MAX_CABINET_NAME 256
  82. #define CB_MAX_CAB_PATH 256
  83. #define CB_MAX_DISK_NAME 256
  84. /*** tcompXXX - Diamond compression types
  85. *
  86. * These are passed to FCIAddFile(), and are also stored in the CFFOLDER
  87. * structures in cabinet files.
  88. *
  89. * NOTE: We reserve bits for the TYPE, QUANTUM_LEVEL, and QUANTUM_MEM
  90. * to provide room for future expansion. Since this value is stored
  91. * in the CFDATA records in the cabinet file, we don't want to
  92. * have to change the format for existing compression configurations
  93. * if we add new ones in the future. This will allows us to read
  94. * old cabinet files in the future.
  95. */
  96. typedef unsigned short TCOMP; /* tcomp */
  97. #define tcompMASK_TYPE 0x000F // Mask for compression type
  98. #define tcompTYPE_NONE 0x0000 // No compression
  99. #define tcompTYPE_MSZIP 0x0001 // MSZIP
  100. #define tcompTYPE_QUANTUM 0x0002 // Quantum
  101. #define tcompTYPE_LZX 0x0003 // LZX
  102. #define tcompBAD 0x000F // Unspecified compression type
  103. #define tcompMASK_LZX_WINDOW 0x1F00 // Mask for LZX Compression Memory
  104. #define tcompLZX_WINDOW_LO 0x0F00 // Lowest LZX Memory (15)
  105. #define tcompLZX_WINDOW_HI 0x1500 // Highest LZX Memory (21)
  106. #define tcompSHIFT_LZX_WINDOW 8 // Amount to shift over to get int
  107. #define tcompMASK_QUANTUM_LEVEL 0x00F0 // Mask for Quantum Compression Level
  108. #define tcompQUANTUM_LEVEL_LO 0x0010 // Lowest Quantum Level (1)
  109. #define tcompQUANTUM_LEVEL_HI 0x0070 // Highest Quantum Level (7)
  110. #define tcompSHIFT_QUANTUM_LEVEL 4 // Amount to shift over to get int
  111. #define tcompMASK_QUANTUM_MEM 0x1F00 // Mask for Quantum Compression Memory
  112. #define tcompQUANTUM_MEM_LO 0x0A00 // Lowest Quantum Memory (10)
  113. #define tcompQUANTUM_MEM_HI 0x1500 // Highest Quantum Memory (21)
  114. #define tcompSHIFT_QUANTUM_MEM 8 // Amount to shift over to get int
  115. #define tcompMASK_RESERVED 0xE000 // Reserved bits (high 3 bits)
  116. #define CompressionTypeFromTCOMP(tc) \
  117. ((tc) & tcompMASK_TYPE)
  118. #define CompressionLevelFromTCOMP(tc) \
  119. (((tc) & tcompMASK_QUANTUM_LEVEL) >> tcompSHIFT_QUANTUM_LEVEL)
  120. #define CompressionMemoryFromTCOMP(tc) \
  121. (((tc) & tcompMASK_QUANTUM_MEM) >> tcompSHIFT_QUANTUM_MEM)
  122. #define TCOMPfromTypeLevelMemory(t,l,m) \
  123. (((m) << tcompSHIFT_QUANTUM_MEM ) | \
  124. ((l) << tcompSHIFT_QUANTUM_LEVEL) | \
  125. ( t ))
  126. #define LZXCompressionWindowFromTCOMP(tc) \
  127. (((tc) & tcompMASK_LZX_WINDOW) >> tcompSHIFT_LZX_WINDOW)
  128. #define TCOMPfromLZXWindow(w) \
  129. (((w) << tcompSHIFT_LZX_WINDOW ) | \
  130. ( tcompTYPE_LZX ))
  131. //** Revert to default structure packing
  132. #ifndef _WIN64
  133. #include <poppack.h>
  134. #endif
  135. #ifdef __cplusplus
  136. }
  137. #endif /* __cplusplus */
  138. #endif // !INCLUDED_TYPES_FCI_FDI
  139. /*** fci_int.h - File Compression Interface definitions
  140. *
  141. * Microsoft Confidential
  142. * Copyright (C) Microsoft Corporation 1993-1994
  143. * All Rights Reserved.
  144. *
  145. * Author:
  146. * Chuck Strouss
  147. *
  148. * History:
  149. * 09-Jan-1994 chuckst Contents moved to bfol.h, this file is a
  150. * placeholder for the new 'higher-level' fci
  151. * 14-Feb-1994 bens Cleaned up some comments.
  152. * 09-Mar-1994 bens Added error codes (moved from buildcab.h);
  153. * Added RESERVE control
  154. * 17-Mar-1994 bens Specify structure packing explicitly
  155. * 21-Mar-1994 bens Cleaned up names
  156. * 22-Mar-1994 bens Documented error cods
  157. * 29-Mar-1994 bens Add FCIFlushFolder, renamed FCIFlushCabinet
  158. * 18-Apr-1994 bens Changed CDECL to DIAMONDAPI
  159. * 18-May-1994 bens Add ccab.fFailOnIncompressible field for
  160. * Chicago M6 hack.
  161. */
  162. #ifndef INCLUDED_FCI
  163. #define INCLUDED_FCI 1
  164. #include <basetsd.h>
  165. #ifdef __cplusplus
  166. extern "C" { /* Assume C declarations for C++ */
  167. #endif /* __cplusplus */
  168. //** Specify structure packing explicitly for clients of FCI
  169. #ifndef _WIN64
  170. #pragma pack(4)
  171. #endif
  172. /*** FCIERROR - Error codes returned in erf.erfOper field
  173. *
  174. */
  175. typedef enum {
  176. FCIERR_NONE, // No error
  177. FCIERR_OPEN_SRC, // Failure opening file to be stored in cabinet
  178. // erf.erfTyp has C run-time *errno* value
  179. FCIERR_READ_SRC, // Failure reading file to be stored in cabinet
  180. // erf.erfTyp has C run-time *errno* value
  181. FCIERR_ALLOC_FAIL, // Out of memory in FCI
  182. FCIERR_TEMP_FILE, // Could not create a temporary file
  183. // erf.erfTyp has C run-time *errno* value
  184. FCIERR_BAD_COMPR_TYPE, // Unknown compression type
  185. FCIERR_CAB_FILE, // Could not create cabinet file
  186. // erf.erfTyp has C run-time *errno* value
  187. FCIERR_USER_ABORT, // Client requested abort
  188. FCIERR_MCI_FAIL, // Failure compressing data
  189. } FCIERROR;
  190. /*
  191. * FAT file attribute flag used by FCI/FDI to indicate that
  192. * the filename in the CAB is a UTF string
  193. */
  194. #ifndef _A_NAME_IS_UTF
  195. #define _A_NAME_IS_UTF 0x80
  196. #endif
  197. /*
  198. * FAT file attribute flag used by FCI/FDI to indicate that
  199. * the file should be executed after extraction
  200. */
  201. #ifndef _A_EXEC
  202. #define _A_EXEC 0x40
  203. #endif
  204. /*** HFCI - Handle to an FCI Context
  205. *
  206. */
  207. typedef void * HFCI;
  208. /*** CCAB - Current Cabinet
  209. *
  210. * This structure is used for passing in the cabinet parameters to FCI,
  211. * and is passed back on certain FCI callbacks to provide cabinet
  212. * information to the client.
  213. */
  214. typedef struct {
  215. // longs first
  216. ULONG cb; // size available for cabinet on this media
  217. ULONG cbFolderThresh; // Thresshold for forcing a new Folder
  218. // then ints
  219. UINT cbReserveCFHeader; // Space to reserve in CFHEADER
  220. UINT cbReserveCFFolder; // Space to reserve in CFFOLDER
  221. UINT cbReserveCFData; // Space to reserve in CFDATA
  222. int iCab; // sequential numbers for cabinets
  223. int iDisk; // Disk number
  224. #ifndef REMOVE_CHICAGO_M6_HACK
  225. int fFailOnIncompressible; // TRUE => Fail if a block is incompressible
  226. #endif
  227. // then shorts
  228. USHORT setID; // Cabinet set ID
  229. // then chars
  230. char szDisk[CB_MAX_DISK_NAME]; // current disk name
  231. char szCab[CB_MAX_CABINET_NAME]; // current cabinet name
  232. char szCabPath[CB_MAX_CAB_PATH]; // path for creating cabinet
  233. } CCAB; /* ccab */
  234. typedef CCAB *PCCAB; /* pccab */
  235. /*** FNALLOC - Memory Allocation
  236. * FNFREE - Memory Free
  237. *
  238. * These are modeled after the C run-time routines malloc() and free()
  239. * (16-bit clients please note -- the size is a ULONG, so you may need
  240. * to write a wrapper routine for halloc!). FDI expects error
  241. * handling to be identical to these C run-time routines.
  242. *
  243. * As long as you faithfully copy the semantics of malloc() and free(),
  244. * you can supply any functions you like!
  245. *
  246. * WARNING: You should never assume anything about the sequence of
  247. * PFNALLOC and PFNFREE calls -- incremental releases of
  248. * Diamond/FDI may have radically different numbers of
  249. * PFNALLOC calls and allocation sizes!
  250. */
  251. //** Memory functions for FCI
  252. typedef void HUGE * (FAR DIAMONDAPI *PFNFCIALLOC)(ULONG cb); /* pfna */
  253. #define FNFCIALLOC(fn) void HUGE * FAR DIAMONDAPI fn(ULONG cb)
  254. typedef void (FAR DIAMONDAPI *PFNFCIFREE)(void HUGE *memory); /* pfnf */
  255. #define FNFCIFREE(fn) void FAR DIAMONDAPI fn(void HUGE *memory)
  256. //** File I/O functions for FCI
  257. typedef INT_PTR (FAR DIAMONDAPI *PFNFCIOPEN) (char FAR *pszFile, int oflag, int pmode, int FAR *err, void FAR *pv);
  258. typedef UINT (FAR DIAMONDAPI *PFNFCIREAD) (INT_PTR hf, void FAR *memory, UINT cb, int FAR *err, void FAR *pv);
  259. typedef UINT (FAR DIAMONDAPI *PFNFCIWRITE)(INT_PTR hf, void FAR *memory, UINT cb, int FAR *err, void FAR *pv);
  260. typedef int (FAR DIAMONDAPI *PFNFCICLOSE)(INT_PTR hf, int FAR *err, void FAR *pv);
  261. typedef long (FAR DIAMONDAPI *PFNFCISEEK) (INT_PTR hf, long dist, int seektype, int FAR *err, void FAR *pv);
  262. typedef int (FAR DIAMONDAPI *PFNFCIDELETE) (char FAR *pszFile, int FAR *err, void FAR *pv);
  263. #define FNFCIOPEN(fn) INT_PTR FAR DIAMONDAPI fn(char FAR *pszFile, int oflag, int pmode, int FAR *err, void FAR *pv)
  264. #define FNFCIREAD(fn) UINT FAR DIAMONDAPI fn(INT_PTR hf, void FAR *memory, UINT cb, int FAR *err, void FAR *pv)
  265. #define FNFCIWRITE(fn) UINT FAR DIAMONDAPI fn(INT_PTR hf, void FAR *memory, UINT cb, int FAR *err, void FAR *pv)
  266. #define FNFCICLOSE(fn) int FAR DIAMONDAPI fn(INT_PTR hf, int FAR *err, void FAR *pv)
  267. #define FNFCISEEK(fn) long FAR DIAMONDAPI fn(INT_PTR hf, long dist, int seektype, int FAR *err, void FAR *pv)
  268. #define FNFCIDELETE(fn) int FAR DIAMONDAPI fn(char FAR *pszFile, int FAR *err, void FAR *pv)
  269. /*** FNFCIGETNEXTCABINET - Callback used to request new cabinet info
  270. *
  271. * Entry:
  272. * pccab - Points to copy of old ccab structure to modify
  273. * cbPrevCab - Estimate of size of previous cabinet
  274. * pv - Has the caller's context pointer
  275. *
  276. * Exit-Success:
  277. * returns TRUE;
  278. *
  279. * Exit-Failure:
  280. * returns FALSE;
  281. */
  282. typedef BOOL (DIAMONDAPI *PFNFCIGETNEXTCABINET)(PCCAB pccab,
  283. ULONG cbPrevCab,
  284. void FAR *pv); /* pfnfcignc */
  285. #define FNFCIGETNEXTCABINET(fn) BOOL DIAMONDAPI fn(PCCAB pccab, \
  286. ULONG cbPrevCab, \
  287. void FAR *pv)
  288. /*** FNFCIFILEPLACED - Notify FCI client that file was placed
  289. *
  290. * Entry:
  291. * pccab - cabinet structure to fill in, with copy of previous one
  292. * pszFile - name of file, from cabinet
  293. * cbFile - length of file
  294. * fContinuation - true if this is a later segment of a continued file
  295. * pv - the context of the client
  296. *
  297. * Exit-Success:
  298. * return value anything but -1
  299. *
  300. * Exit-Failure:
  301. * return value -1 means to abort
  302. */
  303. typedef int (DIAMONDAPI *PFNFCIFILEPLACED)(PCCAB pccab,
  304. char *pszFile,
  305. long cbFile,
  306. BOOL fContinuation,
  307. void FAR *pv); /* pfnfcifp */
  308. #define FNFCIFILEPLACED(fn) int DIAMONDAPI fn(PCCAB pccab, \
  309. char *pszFile, \
  310. long cbFile, \
  311. BOOL fContinuation, \
  312. void FAR *pv)
  313. /*** FNCDIGETOPENINFO - Open source file, get date/time/attribs
  314. *
  315. * Entry:
  316. * pszName -- complete path to filename
  317. * pdate -- location to return FAT-style date code
  318. * ptime -- location to return FAT-style time code
  319. * pattribs -- location to return FAT-style attributes
  320. * pv -- client's context
  321. *
  322. * Exit-Success:
  323. * Return value is file handle of open file to read
  324. *
  325. * Exit-Failure:
  326. * Return value is -1
  327. */
  328. typedef INT_PTR (DIAMONDAPI *PFNFCIGETOPENINFO)(char *pszName,
  329. USHORT *pdate,
  330. USHORT *ptime,
  331. USHORT *pattribs,
  332. int FAR *err,
  333. void FAR *pv); /* pfnfcigoi */
  334. #define FNFCIGETOPENINFO(fn) INT_PTR DIAMONDAPI fn(char *pszName, \
  335. USHORT *pdate, \
  336. USHORT *ptime, \
  337. USHORT *pattribs, \
  338. int FAR *err, \
  339. void FAR *pv)
  340. /*** FNFCISTATUS - Status/Cabinet Size callback
  341. *
  342. * Entry:
  343. * typeStatus == statusFile if compressing a block into a folder
  344. * cb1 = Size of compressed block
  345. * cb2 = Size of uncompressed block
  346. *
  347. * typeStatus == statusFolder if adding a folder to a cabinet
  348. * cb1 = Amount of folder copied to cabinet so far
  349. * cb2 = Total size of folder
  350. *
  351. * typeStatus == statusCabinet if writing out a complete cabinet
  352. * cb1 = Estimated cabinet size that was previously
  353. * passed to fnfciGetNextCabinet().
  354. * cb2 = Actual cabinet size
  355. * NOTE: Return value is desired client size for cabinet
  356. * file. FCI updates the maximum cabinet size
  357. * remaining using this value. This allows a client
  358. * to generate multiple cabinets per disk, and have
  359. * FCI limit the size correctly -- the client can do
  360. * cluster size rounding on the cabinet size!
  361. * The client should either return cb2, or round cb2
  362. * up to some larger value and return that.
  363. * Exit-Success:
  364. * Returns anything other than -1;
  365. * NOTE: See statusCabinet for special return values!
  366. *
  367. * Exit-Failure:
  368. * Returns -1 to signal that FCI should abort;
  369. */
  370. #define statusFile 0 // Add File to Folder callback
  371. #define statusFolder 1 // Add Folder to Cabinet callback
  372. #define statusCabinet 2 // Write out a completed cabinet callback
  373. typedef long (DIAMONDAPI *PFNFCISTATUS)(UINT typeStatus,
  374. ULONG cb1,
  375. ULONG cb2,
  376. void FAR *pv); /* pfnfcis */
  377. #define FNFCISTATUS(fn) long DIAMONDAPI fn(UINT typeStatus, \
  378. ULONG cb1, \
  379. ULONG cb2, \
  380. void FAR *pv)
  381. /*** FNFCIGETTEMPFILE - Callback, requests temporary file name
  382. *
  383. * Entry:
  384. * pszTempName - Buffer to receive complete tempfile name
  385. * cbTempName - Size of pszTempName buffer
  386. *
  387. * Exit-Success:
  388. * return TRUE
  389. *
  390. * Exit-Failure:
  391. * return FALSE; could not create tempfile, or buffer too small
  392. *
  393. * Note:
  394. * It is conceivable that this function may return a filename
  395. * that will already exist by the time it is opened. For this
  396. * reason, the caller should make several attempts to create
  397. * temporary files before giving up.
  398. */
  399. typedef BOOL (DIAMONDAPI *PFNFCIGETTEMPFILE)(char *pszTempName,
  400. int cbTempName,
  401. void FAR *pv); /* pfnfcigtf */
  402. #define FNFCIGETTEMPFILE(fn) BOOL DIAMONDAPI fn(char *pszTempName, \
  403. int cbTempName, \
  404. void FAR *pv)
  405. /*** FCICreate -- create an FCI context (an open CAB, an open FOL)
  406. *
  407. * Entry:
  408. * perf - structure where we return error codes
  409. * pfnfcifp - callback to inform caller of eventual dest of files
  410. * pfna - memory allocation function callback
  411. * pfnf - memory free function callback
  412. * pfnfcigtf - temp file name generator callback
  413. * pccab - pointer to cabinet/disk name & size structure
  414. *
  415. * Notes:
  416. * (1) The alloc/free callbacks must remain valid throughout
  417. * the life of the context, up to and including the call to
  418. * FCIDestroy.
  419. * (2) The perf pointer is stored in the compression context (HCI),
  420. * and any errors from subsequent FCI calls are stored in the
  421. * erf that was passed in on *this* call.
  422. *
  423. * Exit-Success:
  424. * Returns non-NULL handle to an FCI context.
  425. *
  426. * Exit-Failure:
  427. * Returns NULL, perf filled in.
  428. */
  429. HFCI DIAMONDAPI FCICreate(PERF perf,
  430. PFNFCIFILEPLACED pfnfcifp,
  431. PFNFCIALLOC pfna,
  432. PFNFCIFREE pfnf,
  433. PFNFCIOPEN pfnopen,
  434. PFNFCIREAD pfnread,
  435. PFNFCIWRITE pfnwrite,
  436. PFNFCICLOSE pfnclose,
  437. PFNFCISEEK pfnseek,
  438. PFNFCIDELETE pfndelete,
  439. PFNFCIGETTEMPFILE pfnfcigtf,
  440. PCCAB pccab,
  441. void FAR * pv
  442. );
  443. /*** FCIAddFile - Add a disk file to a folder/cabinet
  444. *
  445. * Entry:
  446. * hfci - FCI context handle
  447. * pszSourceFile - Name of file to add to folder
  448. * pszFileName - Name to store into folder/cabinet
  449. * fExecute - Flag indicating execute on extract
  450. * pfn_progress - Progress callback
  451. * pfnfcignc - GetNextCabinet callback
  452. * pfnfcis - Status callback
  453. * pfnfcigoi - OpenInfo callback
  454. * typeCompress - Type of compression to use for this file
  455. * pv - pointer to caller's internal context
  456. *
  457. * Exit-Success:
  458. * returns TRUE
  459. *
  460. * Exit-Failure:
  461. * returns FALSE, error filled in
  462. *
  463. * This is the main function used to add file(s) to a cabinet
  464. * or series of cabinets. If the current file causes the current
  465. * folder/cabinet to overflow the disk image currently being built,
  466. * the cabinet will be terminated, and a new cabinet/disk name will
  467. * be prompted for via a callback. The pending folder will be trimmed
  468. * of the data which has already been generated in the finished cabinet.
  469. */
  470. BOOL DIAMONDAPI FCIAddFile(HFCI hfci,
  471. char *pszSourceFile,
  472. char *pszFileName,
  473. BOOL fExecute,
  474. PFNFCIGETNEXTCABINET pfnfcignc,
  475. PFNFCISTATUS pfnfcis,
  476. PFNFCIGETOPENINFO pfnfcigoi,
  477. TCOMP typeCompress
  478. );
  479. /*** FCIFlushCabinet - Complete the current cabinet under construction
  480. *
  481. * This will cause the current cabinet (assuming it is not empty) to
  482. * be gathered together and written to disk.
  483. *
  484. * Entry:
  485. * hfci - FCI context
  486. * fGetNextCab - TRUE => Call GetNextCab to get continuation info;
  487. * FALSE => Don't call GetNextCab unless this cabinet
  488. * overflows.
  489. * pfnfcignc - callback function to get continuation cabinets
  490. * pfnfcis - callback function for progress reporting
  491. * pv - caller's internal context for callbacks
  492. *
  493. * Exit-Success:
  494. * return code TRUE
  495. *
  496. * Exit-Failure:
  497. * return code FALSE, error structure filled in
  498. */
  499. BOOL DIAMONDAPI FCIFlushCabinet(HFCI hfci,
  500. BOOL fGetNextCab,
  501. PFNFCIGETNEXTCABINET pfnfcignc,
  502. PFNFCISTATUS pfnfcis
  503. );
  504. /*** FCIFlushFolder - Complete the current folder under construction
  505. *
  506. * This will force the termination of the current folder, which may or
  507. * may not cause one or more cabinet files to be completed.
  508. *
  509. * Entry:
  510. * hfci - FCI context
  511. * GetNextCab - callback function to get continuation cabinets
  512. * pfnProgress - callback function for progress reporting
  513. * pv - caller's internal context for callbacks
  514. *
  515. * Exit-Success:
  516. * return code TRUE
  517. *
  518. * Exit-Failure:
  519. * return code FALSE, error structure filled in
  520. */
  521. BOOL DIAMONDAPI FCIFlushFolder(HFCI hfci,
  522. PFNFCIGETNEXTCABINET pfnfcignc,
  523. PFNFCISTATUS pfnfcis
  524. );
  525. /*** FCIDestroy - Destroy a FCI context and delete temp files
  526. *
  527. * Entry:
  528. * hfci - FCI context
  529. *
  530. * Exit-Success:
  531. * return code TRUE
  532. *
  533. * Exit-Failure:
  534. * return code FALSE, error structure filled in
  535. */
  536. BOOL DIAMONDAPI FCIDestroy (HFCI hfci);
  537. //** Revert to default structure packing
  538. #ifndef _WIN64
  539. #pragma pack()
  540. #endif
  541. #ifdef __cplusplus
  542. }
  543. #endif /* __cplusplus */
  544. #endif // !INCLUDED_FCI
  545.