SetEndOfLog function

This function has been deprecated. Use TruncateLog instead.

Syntax


BOOL WINAPI SetEndOfLog(
  _In_        HANDLE       hLog,
  _In_        PCLFS_LSN    plsnEnd,
  _Inout_opt_ LPOVERLAPPED lpOverlapped
);

Parameters

hLog [in]

A handle to the log that is obtained from CreateLogFile.

The log handle must refer to a dedicated log.

plsnEnd [in]

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.

lpOverlapped [in, out, optional]

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:

ERROR_ACCESS_DENIED
ERROR_HANDLE_EOF
ERROR_INVALID_HANDLE
ERROR_INVALID_PARAMETER
ERROR_LOG_INVALID_RANGE

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 R2 [desktop apps only]

Header

Clfsw32.h

Library

Clfsw32.lib

DLL

Clfsw32.dll

See also

CLFS_LSN
Common Log File System Functions
OVERLAPPED

 

 

Community Additions

ADD
Show: