ClfsReadNextLogRecord function (wdm.h)

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

Syntax

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

Parameters

[in, out] pvReadContext

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

[out] ppvBuffer

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

[out] 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.

[in, out] 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.

[in, optional] 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.

[out] plsnUndoNext

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

[out] plsnPrevious

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

[out] 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

Requirement Value
Minimum supported client 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