ClfsDeleteLogFile routine

The ClfsDeleteLogFile routine marks a CLFS stream for deletion.


NTSTATUS ClfsDeleteLogFile(
  _In_      PUNICODE_STRING puszLogFileName,
  _In_opt_  PVOID psdLogFile,
  _In_      ULONG fLogOptionFlag,
  _In_opt_  PVOID pvContext,
  _In_      ULONG cbContext


puszLogFileName [in]

A pointer to a UNICODE_STRING structure that supplies the name of the CLFS stream to be deleted.

If the stream to be deleted is the only stream of a dedicated log, the name has the form log:physical log name, where physical log name is the path name of the physical log on the underlying file system.

If the stream to be deleted is one of the streams of a multiplexed log, the name has the form log:physical log name::stream name, where physical log name is the path name of the physical log on the underlying file system and stream name is the unique name of the stream to be deleted.

psdLogFile [in, optional]

A pointer to a SECURITY_DESCRIPTOR structure that supplies the security attributes for accessing the stream. This parameter can be NULL.

fLogOptionFlag [in]

A value that indicates the relationship between CLFS and the component that is deleting the log. For a list of possible values, see the description of the fLogOptionFlag parameter of the ClfsCreateLogFile routine.

pvContext [in, optional]

A pointer to a context. The way the context is interpreted depends on the value passed in fLogOptionFlag.

cbContext [in]

The size, in bytes, of the context pointed to by pvContext. If pvContext is not NULL, this parameter must be greater than zero.

Return value

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


ClfsDeleteLogFile marks a stream for deletion but does not close any log file objects that are currently open. To close a log file object, call ClfsCloseLogFileObject. A stream marked for deletion is deleted after all log file objects associated with the stream are closed.

A CLFS stream marked for deletion will refuse subsequent requests to open the stream.

The name of a physical CLFS log does not include the .blf extension.

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



Available in Windows Server 2003 R2, Windows Vista, and later versions of Windows.


Wdm.h (include Wdm.h)





See also




Send comments about this topic to Microsoft

© 2014 Microsoft