FNREAD macro (fdi.h)

The FNREAD macro provides the declaration for the application-defined callback function to read data from a file in an FDI context.

Syntax

void FNREAD(
   fn
);

Parameters

fn

An application-defined value used to identify the open file.

Return value

None

Remarks

The function accepts parameters similar to _read.

Examples

FNREAD(fnFileRead)
{
    DWORD dwBytesRead = 0;

    if ( ReadFile((HANDLE)hf, pv, cb, &dwBytesRead, NULL) == FALSE )
    {
        dwBytesRead = (DWORD)-1L;
    }
             
    return dwBytesRead;
}

Requirements

   
Target Platform Windows
Header fdi.h

See also

FDICreate