ILog::TruncatePrefix method

Throws away the specified prefix of the log, making it no longer retrievable.

Syntax


HRESULT TruncatePrefix(
  [in] LSN lsnFirstToKeep
);

Parameters

lsnFirstToKeep [in]

The LSN of the first record not to be thrown away. If this parameter is 0, the entire log is emptied.

Return value

This method can return the following values, as well as other HRESULT values.

Return codeDescription
S_OK

The log was successfully truncated.

E_INVALIDARG

lsnFirstToKeep is outside the current limits of the log. See ILog::GetLogLimits.

 

Remarks

This request is only a hint to the log implementation. The log is free to ignore the request, or to retain more than was strictly requested. Many ILog implementations will follow this latter option.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Txlogpub.h

IDL

Txlogpub.idl

IID

IID_ILog is defined as FF222117-0C6C-11d2-B89A-00C04FB9618A

See also

ILog

 

 

Show: