ExportCallback

The ExportCallback function is an application-defined callback function used with the ReadRaw function. The system calls ExportCallback with blocks of file data. ExportCallback can write the data to another file or another storage media. The system will continue to send data until ExportCallback has received all data for processing.

The PFE_EXPORT_FUNC type defines a pointer to this callback function. ExportCallback is a placeholder for the application-defined function name.

DWORD ExportCallback(
  PBYTE pbData,
  PVOID pvCallbackContext,
  PULONG ulLength
);
 

Parameters

pbData
Pointer to a block of data to be backed up.
pvCallbackContext
Pointer to an application-defined context block.
ulLength
Specifies the length, in bytes, of the data pointed to by the pbData parameter.

Return Values

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is a nonzero error code defined in WINERROR.H. To get a generic description of the error, use FormatMessage with the FORMAT_MESSAGE_FROM_SYSTEM flag.

Remarks

You can use the application-defined context block for internal tracking of information, such as the file handle and the current offset in the file.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in winbase.h.
  Import Library: User-defined.

See Also

File Systems Overview, File System Functions, ReadRaw