Bewerken

Delen via


ClfsReadPreviousRestartArea function (wdm.h)

The ClfsReadPreviousRestartArea routine reads the previous restart record relative to the current record in a read context.

Syntax

CLFSUSER_API NTSTATUS ClfsReadPreviousRestartArea(
  [in]  PVOID     pvReadContext,
  [out] PVOID     *ppvRestartBuffer,
  [out] PULONG    pcbRestartBuffer,
  [out] PCLFS_LSN plsnRestart
);

Parameters

[in] pvReadContext

A pointer to a read context obtained by a previous call to ClfsReadRestartArea.

[out] ppvRestartBuffer

A pointer to a variable that receives a pointer to the data buffer of the restart record that is read.

[out] pcbRestartBuffer

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

[out] plsnRestart

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

Return value

ClfsReadPreviousRestartArea returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h. If there are no previous restart areas, the return value is STATUS_LOG_START_OF_LOG.

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.

Clients append restart records to a CLFS log by calling ClfsWriteRestartArea.

With the ReadPreviousLogRestartArea routine, clients can implement a form of fuzzy checkpointing. For example, the checkpoint state could consist of the log records delimited by two or more restart records.

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

ClfsReadRestartArea

ClfsWriteRestartArea