FCICreate function
The FCICreate function creates an FCI context.
Syntax
HFCI FCICreate(
_Inout_ PERF perf,
_In_ PFNFCIFILEPLACED pfnfiledest,
_In_ PFNFCIALLOC pfnalloc,
_In_ PFNFCIFREE pfnfree,
_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_opt_ void FAR *pv
);
Parameters
- perf [in, out]
-
Pointer to an ERF structure that receives the error information.
- pfnfiledest [in]
-
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.
- pfnalloc [in]
-
Pointer to an application-defined callback function to allocate memory. The function should be declared using the FNFCIALLOC macro.
- pfnfree [in]
-
Pointer to an application-defined callback function to free previously allocated memory. The function should be delcared using the FNFCIFREE macro.
- pfnopen [in]
-
Pointer to an application-defined callback function to open a file. The function should be declared using the FNFCIOPEN macro.
- pfnread [in]
-
Pointer to an application-defined callback function to read data from a file. The function should be declared using the FNFCIREAD macro.
- pfnwrite [in]
-
Pointer to an application-defined callback function to write data to a file. The function should be declared using the FNFCIWRITE macro.
- pfnclose [in]
-
Pointer to an application-defined callback function to close a file. The function should be declared using the FNFCICLOSE macro.
- pfnseek [in]
-
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 [in]
-
Pointer to an application-defined callback function to delete a file. The function should be declared using the FNFCIDELETE macro.
- pfnfcigtf [in]
-
Pointer to an application-defined callback function to retrieve a temporary file name. The function should be declared using the FNFCIGETTEMPFILE macro.
- pccab [in]
-
Pointer to a CCAB structure that contains the parameters for creating a cabinet.
- pv [in, optional]
-
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.
Example
For an example, see Creating a Cabinet.
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
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|
See also