FCICreate function (fci.h)

The FCICreate function creates an FCI context.

Syntax

HFCI DIAMONDAPI FCICreate(
  [in, out]      PERF              perf,
  [in]           PFNFCIFILEPLACED  pfnfcifp,
  [in]           PFNFCIALLOC       pfna,
  [in]           PFNFCIFREE        pfnf,
  [in]           PFNFCIOPEN        pfnopen,
  [in]           PFNFCIREAD        pfnread,
  [in]           PFNFCIWRITE       pfnwrite,
  [in]           PFNFCICLOSE       pfnclose,
  [in]           PFNFCISEEK        pfnseek,
  [in]           PFNFCIDELETE      pfndelete,
  [in]           PFNFCIGETTEMPFILE pfnfcigtf,
  [in]           PCCAB             pccab,
  [in, optional] void              *pv
);

Parameters

[in, out] perf

Pointer to an ERF structure that receives the error information.

[in] pfnfcifp

Pointer to an application-defined callback function to notify when a file is placed in the cabinet. The function should be declared using the FNFCIFILEPLACED macro.

[in] pfna

Pointer to an application-defined callback function to allocate memory. The function should be declared using the FNFCIALLOC macro.

[in] pfnf

Pointer to an application-defined callback function to free previously allocated memory. The function should be declared using the FNFCIFREE macro.

[in] pfnopen

Pointer to an application-defined callback function to open a file. The function should be declared using the FNFCIOPEN macro.

[in] pfnread

Pointer to an application-defined callback function to read data from a file. The function should be declared using the FNFCIREAD macro.

[in] pfnwrite

Pointer to an application-defined callback function to write data to a file. The function should be declared using the FNFCIWRITE macro.

[in] pfnclose

Pointer to an application-defined callback function to close a file. The function should be declared using the FNFCICLOSE macro.

[in] pfnseek

Pointer to an application-defined callback function to move a file pointer to the specific location. The function should be declared using the FNFCISEEK macro.

[in] pfndelete

Pointer to an application-defined callback function to delete a file. The function should be declared using the FNFCIDELETE macro.

[in] pfnfcigtf

Pointer to an application-defined callback function to retrieve a temporary file name. The function should be declared using the FNFCIGETTEMPFILE macro.

[in] pccab

Pointer to a CCAB structure that contains the parameters for creating a cabinet.

[in, optional] pv

Pointer to an application-defined value that is passed to callback functions.

Return value

If the function succeeds, it returns a non-NULL HFCI context pointer; otherwise, NULL.

Extended error information is provided in the ERF structure.

Remarks

FCI supports multiple simultaneous contexts. As a result it is possible to create or extract multiple cabinets at the same time within the same application. If the application is multithreaded, it is also possible to run a different context in each thread; however, an application cannot use the same context simultaneously in multiple threads. For example, FCIAddFile cannot be called from two different threads, using the same FCI context.

Requirements

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

See also

FCIAddFile

FCIDestroy

FCIFlushFolder