SetEndOfLog function (clfsw32.h)

This function has been deprecated. Use TruncateLog instead.

Syntax

CLFSUSER_API BOOL SetEndOfLog(
  [in]                HANDLE       hLog,
  [in]                PCLFS_LSN    plsnEnd,
  [in, out, optional] LPOVERLAPPED lpOverlapped
);

Parameters

[in] hLog

A handle to the log that is obtained from CreateLogFile.

The log handle must refer to a dedicated log.

[in] plsnEnd

A pointer to a CLFS_LSN structure that specifies the new end of a log.

The LSN must be between the base log sequence number (LSN) of the log and the last LSN of the log.

[in, out, optional] lpOverlapped

Reserved. Set lpOverlapped to NULL.

Return value

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 SetEndOfLog function truncates the log by setting the end of the log to the specified value. This operation only works on dedicated logs.

SetEndOfLog can only be used to truncate a log.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 R2 [desktop apps only]
Target Platform Windows
Header clfsw32.h
Library Clfsw32.lib
DLL Clfsw32.dll

See also

CLFS_LSN

Common Log File System Functions

OVERLAPPED