Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

FDICreate function

The FDICreate function creates an FDI context.

Syntax


HFDI FDICreate(
  _In_    PFNALLOC pfnalloc,
  _In_    PFNFREE  pfnfree,
  _In_    PFNOPEN  pfnopen,
  _In_    PFNREAD  pfnread,
  _In_    PFNWRITE pfnwrite,
  _In_    PFNCLOSE pfnclose,
  _In_    PFNSEEK  pfnseek,
  _In_    int      cpuType,
  _Inout_ PERF     perf
);

Parameters

pfnalloc [in]

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

pfnfree [in]

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

pfnopen [in]

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

pfnread [in]

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

pfnwrite [in]

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

pfnclose [in]

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

pfnseek [in]

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

cpuType [in]

In the 16-bit version of FDI, specifies the CPU type and can be any of the following values.

Note  Expressing the cpuUNKNOWN value is recommended.
 
ValueMeaning
cpuUNKNOWN
-1

FDI should determine the CPU type.

cpu80286
0

Only 80286 instructions can be used.

cpu80386
1

80386 instructions can be used.

 

perf [in, out]

Pointer to an ERF structure that receives the error information.

Return value

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

Extended error information is provided in the ERF structure.

Example

For an example, see Extracting Files from a Cabinet.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Fdi.h

Library

Cabinet.lib

DLL

Cabinet.dll

See also

FDIDestroy

 

 

Show: