FDICreate function (fdi.h)

The FDICreate function creates an FDI context.

Syntax

HFDI DIAMONDAPI 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,
  [in, out] PERF     perf
);

Parameters

[in] pfnalloc

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

[in] pfnfree

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

[in] pfnopen

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

[in] pfnread

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

[in] pfnwrite

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

[in] pfnclose

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

[in] pfnseek

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.

[in] cpuType

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.
 
Value Meaning
cpuUNKNOWN
-1
FDI should determine the CPU type.
cpu80286
0
Only 80286 instructions can be used.
cpu80386
1
80386 instructions can be used.

[in, out] perf

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.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header fdi.h
Library Cabinet.lib
DLL Cabinet.dll

See also

FDIDestroy