FCICreate function

The FCICreate function creates an FCI context.

Syntax

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

Parameters

perf

Pointer to an ERF structure that receives the error information.

pfnfcifp

TBD

pfna

TBD

pfnf

TBD

pfnopen

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

pfnread

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

pfnwrite

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

pfnclose

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

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.

pfndelete

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

pfnfcigtf

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

pccab

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

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

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

See Also

FCIAddFile

FCIDestroy

FCIFlushFolder