Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

CcReadAhead macro

The CcReadAhead macro performs read-ahead (also called "lazy read") on a cached file.

Syntax

VOID CcReadAhead(
 [in] PFILE_OBJECT   FileObject,
 [in] PLARGE_INTEGER FileOffset,
 [in] ULONG          Length
);

Parameters

  • FileObject [in]
    Pointer to a file object for the cached file on which read-ahead is to be performed.

  • FileOffset [in]
    Pointer to a variable that specifies the starting byte offset within the cached file where the last read occurred.

  • Length [in]
    Length in bytes of the range that was last read.

Return value

None

Remarks

The CcReadAhead macro is a wrapper for CcScheduleReadAhead that calls CcScheduleReadAhead only if Length >= 256. Measurements have shown that calling CcScheduleReadAhead for smaller reads actually decreases performance.

CcReadAhead can only be called after a successful call to CcCopyRead, CcFastCopyRead, or CcMdlRead.

Requirements

Target platform

Desktop

Header

Ntifs.h (include Ntifs.h)

See also

CcCopyRead

CcFastCopyRead

CcMdlRead

CcScheduleReadAhead

CcSetAdditionalCacheAttributes

CcSetReadAheadGranularity

Send comments about this topic to Microsoft

Additional resources