FCIAddFile function

The FCIAddFile adds a file to the cabinet under construction.

Syntax

BOOL DIAMONDAPI FCIAddFile(
  HFCI                 hfci,
  LPSTR                pszSourceFile,
  LPSTR                pszFileName,
  BOOL                 fExecute,
  PFNFCIGETNEXTCABINET pfnfcignc,
  PFNFCISTATUS         pfnfcis,
  PFNFCIGETOPENINFO    pfnfcigoi,
  TCOMP                typeCompress
);

Parameters

hfci

A valid FCI context handle returned by the FCICreate function.

pszSourceFile

The name of the file to add; this value should include path information.

pszFileName

The name under which to store the file in the cabinet.

fExecute

If set TRUE, the file will be executed when extracted.

pfnfcignc

TBD

pfnfcis

TBD

pfnfcigoi

TBD

typeCompress

The compression type to use.

Note  To indicate LZX compression, use the TCOMPfromLZXWindow macro.
 
Value Meaning
tcompTYPE_NONE
0x0000
No compression.
tcompTYPE_MSZIP
0x0001
Microsoft ZIP compression.

Return Value

If the function succeeds, it returns TRUE; otherwise, FALSE.

Extended error information is provided in the ERF structure used to create the FCI context.

Remarks

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.

Requirements

   
Target Platform Windows
Header fci.h
Library Cabinet.lib
DLL Cabinet.dll

See Also

FCICreate