Leaked source code of windows server 2003
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.

640 lines
23 KiB

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