DeleteLogFile function (clfsw32.h)

Marks a log for deletion. The log is actually deleted when all handles, marshaling areas, and read contexts to the log are closed. If the log is a physical log, its underlying containers are deleted.

When a log is marked for deletion, requests to open new client log streams fail.

Note  A closely related function is DeleteLogByHandle, which deletes a log when given the handle of the file.

 

Syntax

CLFSUSER_API BOOL DeleteLogFile(
  [in]           LPCWSTR pszLogFileName,
  [in, optional] PVOID   pvReserved
);

Parameters

[in] pszLogFileName

The name of the log.

This name is specified when creating the log by using CreateLogFile. The following example identifies the format to use:

log:<log name>[::<log stream name>]

<log name> corresponds to a valid file path in the file system.

<log stream name> is the unique name of a log stream in the log.

For more information, see Log Types.

[in, optional] pvReserved

This parameter is reserved and should be set to NULL.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero (0). To get extended error information, call GetLastError. The following list identifies the possible error codes:

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

Common Log File System Functions

CreateLogFile

DeleteLogByHandle

SECURITY_ATTRIBUTES