RemoveLogContainer function (clfsw32.h)

Removes one container from a log that is associated with a dedicated or multiplexed log handle.

A client must have administrative privileges on the log handle to remove a container. To remove multiple containers, use the RemoveLogContainerSet function.

Syntax

CLFSUSER_API BOOL RemoveLogContainer(
  [in]                HANDLE hLog,
  [in]                LPWSTR pwszContainerPath,
  [in]                BOOL   fForce,
  [in, out, optional] LPVOID pReserved
);

Parameters

[in] hLog

A handle to the log that is obtained from CreateLogFile.

[in] pwszContainerPath

A pointer to a wide character string that contains a path for a log container that is created by either AddLogContainer or AddLogContainerSet.

[in] fForce

The deletion flag that determines when and how a container is deleted.

If fForce is TRUE, and the container is part of the active log region, the container is not deleted and an error ERROR_LOG_CANT_DELETE is returned.

If FALSE, the container is deleted when the container is no longer a part of the active log region.

[in, out, optional] pReserved

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. To get extended error information, call GetLastError.

The following list identifies the possible error codes:

Remarks

By default, container deletion is lazy, which means that a container is deleted only if it is not part of an active log. If the container is part of the active log, it is marked for deletion. However, deletion does not occur until the end of the log exceeds the last sector of the container, or the container has a logical identifier that is greater than the logical identifier of the head of the active log. The log size reflects the container deletion only when the container is deleted physically.

A log client can request a forced deletion on a container by setting the deletion flag to TRUE. This has the same effect as deleting a container that is not part of the active log. However, if the container is part of the active log, the call fails without marking the container for deletion.

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

AddLogContainer

AddLogContainerSet

Common Log File System Functions

OVERLAPPED

RemoveLogContainerSet