ClfsReadNextLogRecord function

The ClfsReadNextLogRecord routine reads the next record in a sequence, relative to the current record in a read context.

Syntax

CLFSUSER_API NTSTATUS ClfsReadNextLogRecord(
  PVOID             pvReadContext,
  PVOID             *ppvBuffer,
  PULONG            pcbBuffer,
  PCLFS_RECORD_TYPE peRecordType,
  PCLFS_LSN         plsnUser,
  PCLFS_LSN         plsnUndoNext,
  PCLFS_LSN         plsnPrevious,
  PCLFS_LSN         plsnRecord
);

Parameters

pvReadContext

A pointer to a read context that the caller previously obtained by calling ClfsReadLogRecord or ClfsReadRestartArea.

ppvBuffer

A pointer to a variable that receives a pointer to a buffer that contains the record data.

pcbBuffer

A pointer to a ULONG-typed variable that receives the size, in bytes, of the buffer pointed to by *ppvBuffer. This is the length of the data buffer of the record read.

peRecordType

A pointer to a variable of type CLFS_RECORD_TYPE. The caller must set this parameter to one of the following values.

Value Record that will be read
ClfsDataRecord The next data record.
ClfsRestartRecord The next restart record.
ClfsClientRecord The next record that is either a data record or a restart record.

plsnUser

A pointer to a CLFS_LSN structure that supplies the LSN of the record to be read. The specified record is read instead of the record that would have been read according to the mode (ClfsContextUndoNext, ClfsContextPrevious, or ClfsContextForward) of the read context (pvReadContext). The LSN supplied in plsnUser must be less than the current LSN of the read context. This parameter can be NULL.

plsnUndoNext

A pointer to a CLFS_LSN structure that receives the undo-next LSN of the record that is read.

plsnPrevious

A pointer to a CLFS_LSN structure that receives the previous LSN of the record that was read.

plsnRecord

A pointer to a CLFS_LSN structure that receives the LSN of the record that was read.

Return Value

ClfsReadNextLogRecord returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.

Remarks

For an explanation of CLFS concepts and terminology, see Common Log File System.

For information about reading records from CLFS streams, see Reading Data Records from a CLFS Stream and Reading Restart Records from a CLFS Stream.

Read contexts are not thread-safe. Clients are responsible for serializing access to read contexts.

Requirements

   
Windows version Available in Windows Server 2003 R2, Windows Vista, and later versions of Windows.
Target Platform Desktop
Header wdm.h (include Wdm.h)
Library Clfs.lib
DLL Clfs.sys
IRQL "<= APC_LEVEL"

See Also

CLFS_LSN

ClfsReadLogRecord

ClfsReadRestartArea