Windows Dev Center

RemoveLogContainerSet function

Removes multiple containers 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. The RemoveLogContainer function is a special case of this RemoveLogContainerSet function, because it removes only one container. To remove multiple containers, use the RemoveLogContainerSet.

Syntax


BOOL WINAPI RemoveLogContainerSet(
  _In_        HANDLE hLog,
  _In_        USHORT cContainers,
  _In_        LPWSTR *rgwszContainerPath,
  _In_        BOOL   fForce,
  _Inout_opt_ LPVOID pReserved
);

Parameters

hLog [in]

A handle to the log that is obtained from CreateLogFile.

The log handle must have administrative permission to add a log container, and can refer to either a dedicated or multiplexed log.

cContainers [in]

The number of container path names in an array that is pointed to by rgwszContainerPath.

This value must be nonzero.

rgwszContainerPath [in]

An array of pointers to container path names that contain cContainers pointers.

Each path name is a wide character string that identifies a container created by either AddLogContainer or AddLogContainerSet.

fForce [in]

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.

pReserved [in, out, optional]

Reserved. Set pReserved 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:

ERROR_ACCESS_DENIED
ERROR_CANT_RESOLVE_FILENAME
ERROR_INVALID_HANDLE
ERROR_INVALID_PARAMETER
ERROR_IO_PENDING
ERROR_LOG_CANT_DELETE

Remarks

By default, container deletion is lazy, which means that a container is deleted only if it is not part of the active log. If the container is part of the active log it is marked for deletion. This deletion is deferred until the tail 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 a container is part of the active log, the call fails without marking the container for deletion.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 R2 [desktop apps only]

Header

Clfsw32.h

Library

Clfsw32.lib

DLL

Clfsw32.dll

See also

AddLogContainer
AddLogContainerSet
Common Log File System Functions
OVERLAPPED
RemoveLogContainer

 

 

Community Additions

ADD
Show:
© 2015 Microsoft