Skip to content

Latest commit

 

History

History
154 lines (108 loc) · 5.87 KB

nf-clfsw32-writelogrestartarea.md

File metadata and controls

154 lines (108 loc) · 5.87 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:clfsw32.WriteLogRestartArea
WriteLogRestartArea function (clfsw32.h)
Appends a new client restart area to a log, and optionally advances the base log sequence number (LSN) of the log.
CLFS_FLAG_NO_FLAGS
CLFS_FLAG_USE_RESERVATION
WriteLogRestartArea
WriteLogRestartArea function [Files]
clfsw32/WriteLogRestartArea
fs.writelogrestartarea
fs\writelogrestartarea.htm
fs
deb5fd90-e987-4e5b-9740-6ecef8705557
12/05/2018
CLFS_FLAG_NO_FLAGS, CLFS_FLAG_USE_RESERVATION, WriteLogRestartArea, WriteLogRestartArea function [Files], clfsw32/WriteLogRestartArea, fs.writelogrestartarea
clfsw32.h
Windows
Windows Vista [desktop apps only]
Windows Server 2003 R2 [desktop apps only]
Clfsw32.lib
Clfsw32.dll
Windows
19H1
WriteLogRestartArea
clfsw32/WriteLogRestartArea
c++
APIRef
kbSyntax
DllExport
Clfsw32.dll
WriteLogRestartArea

WriteLogRestartArea function

-description

Appends a new client restart area to a log, and optionally advances the base log sequence number (LSN) of the log.

After it is successfully written to a disk, the last LSN of the log is changed to the LSN of the appended restart record. Typically, WriteLogRestartArea is used by applications that regularly save a known good state, and the restart area contains the LSNs for existing log record chains.

-parameters

-param pvMarshal [in, out]

A pointer to the marshaling context that is allocated by using the CreateLogMarshallingArea function.

-param pvRestartBuffer [in]

A pointer to a buffer that contains restart data.

-param cbRestartBuffer [in]

The size of pvRestartBuffer, in bytes.

-param plsnBase [in, optional]

A pointer to a CLFS_LSN structure that specifies the new base LSN of the log after successfully writing the restart area.

This value cannot be outside the range of the active log. It must be at least the value of the current base LSN, and not greater than the LSN that was returned in the lastLSN parameter from the latest call to ReserveAndAppendLog. If you omit this optional parameter, the base LSN does not change.

-param fFlags [in]

The flags that specify the behavior of this function.

One or more of the following values can be combined.

Value Meaning
CLFS_FLAG_NO_FLAGS
Assigns no flags.
CLFS_FLAG_USE_RESERVATION
Appends the current record by using the space that is reserved in the marshaling area.

-param pcbWritten [out, optional]

A pointer to a variable that receives the number of bytes that are written when an operation completes.

-param plsnNext [out, optional]

A pointer to a CLFS_LSN structure that specifies the LSN of the restart area that is written.

-param pOverlapped [in, out, optional]

A pointer to an OVERLAPPED structure.

This parameter can be NULL if an asynchronous operation is not used.

-returns

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

The following list identifies the possible error codes:

-remarks

The WriteLogRestartArea causes both a flush of all current buffered log records and a flush of the log metadata.

If a client calls WriteLogRestartArea on a log that is created to support asynchronous operations (for example, if the fFlagsAndAttributes parameter of CreateLogFile is set to FILE_FLAG_OVERLAPPED when the log is created), the client must supply a pointer to a valid OVERLAPPED structure in the pOverlapped parameter of WriteLogRestartArea.

Then, if WriteLogRestartArea fails with an error of ERROR_IO_PENDING, a pointer to a valid read context is placed in the variable that is pointed to by the ppvReadContext parameter.

To complete the call, the client should synchronize its execution with deferred completion of the overlapped I/O operation by using GetOverlappedResult or one of the synchronization Wait Functions. For more information, see Synchronization and Overlapped Input and Output.

-see-also

CLFS_LSN

Common Log File System Functions

OVERLAPPED