ClfsCloseAndResetLogFile function (wdm.h)

The ClfsCloseAndResetLogFile routine releases all references to a specified log file object and marks its associated stream for reset.

Syntax

CLFSUSER_API NTSTATUS ClfsCloseAndResetLogFile(
  [in] PLOG_FILE_OBJECT plfoLog
);

Parameters

[in] plfoLog

A pointer to a LOG_FILE_OBJECT structure for which references will be released. The caller previously obtained this pointer by calling ClfsCreateLogFile.

Return value

ClfsCloseAndResetLogFile returns STATUS_SUCCESS if it succeeds; otherwise, it returns one of the error codes defined in Ntstatus.h.

Remarks

ClfsCloseAndResetLogFile releases all references, acquired by CLFS, to the specified log file object. Typically, the client will not have acquired any additional references to the log file object. However, if the client has obtained additional refereces, it is the client's responsibility to release them.

ClfsCloseAndResetLogFile causes the specified log file object's reference count to drop to zero, at which time the log file object is closed (that is, its memory is deallocated). The stream represented by the log file object might not be reset, however, because there could be other log file objects that represent the same stream. The stream is reset after all log file objects that represent the stream are closed (for example by calls to ClfsCloseLogFileObject).

A reset stream is like a newly created stream that has never had any records written to it.

On return from this routine, plfoLog is invalid.

You can call ClfsCloseAndResetLogFile at most 124 times for a given stream.

For an explanation of CLFS concepts and terminology, see Common Log File System.

Requirements

Requirement Value
Minimum supported client Available in Windows Server 2003 R2, Windows Vista, and later versions of Windows.
Target Platform Desktop
Header wdm.h (include Wdm.h)
Library Clfs.lib
DLL Clfs.sys
IRQL <= APC_LEVEL

See also

ClfsCloseLogFileObject

ClfsDeleteLogByPointer

ClfsDeleteLogFile