TruncateLog function (clfsw32.h)

Truncates the log. The function sets the end of the log to the specified value.

Syntax

CLFSUSER_API BOOL TruncateLog(
  [in]                PVOID        pvMarshal,
  [in]                PCLFS_LSN    plsnEnd,
  [in, out, optional] LPOVERLAPPED lpOverlapped
);

Parameters

[in] pvMarshal

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

[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 Reserved 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

If the volume sector size is greater than 512 bytes, TruncateLog returns ERROR_NOT_SUPPORTED.

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