FCIAddFile function (fci.h)
The FCIAddFile adds a file to the cabinet under construction.
BOOL DIAMONDAPI FCIAddFile(
[in] HFCI hfci,
[in] LPSTR pszSourceFile,
[in] LPSTR pszFileName,
[in] BOOL fExecute,
[in] PFNFCIGETNEXTCABINET pfnfcignc,
[in] PFNFCISTATUS pfnfcis,
[in] PFNFCIGETOPENINFO pfnfcigoi,
[in] TCOMP typeCompress
);
[in] hfci
A valid FCI context handle returned by the FCICreate function.
[in] pszSourceFile
The name of the file to add; this value should include path information.
[in] pszFileName
The name under which to store the file in the cabinet.
[in] fExecute
If set TRUE, the file will be executed when extracted.
[in] pfnfcignc
Pointer to an application-defined callback function to obtain specifications on the next cabinet to create. The function should be declared using the FNFCIGETNEXTCABINET macro.
[in] pfnfcis
Pointer to an application-defined callback function to update the progress information available to the user. The function should be declared using the FNFCISTATUS macro.
[in] pfnfcigoi
Pointer to an application-defined callback function to open a file and retrieve the file date, time, and attributes. The function should be declared using the FNFCIGETOPENINFO macro.
[in] typeCompress
The compression type to use.
Value | Meaning |
---|---|
|
No compression. |
|
Microsoft ZIP compression. |
If the function succeeds, it returns TRUE; otherwise, FALSE.
Extended error information is provided in the ERF structure used to create the FCI context.
When set, the _A_EXEC attribute is added to the file entry in the CAB. This mechanism is used in some Microsoft self-extracting executables, and could be used for this purpose in any custom extraction application.
Requirement | Value |
---|---|
Target Platform | Windows |
Header | fci.h |
Library | Cabinet.lib |
DLL | Cabinet.dll |