ScanLogContainers function (clfsw32.h)

Enumerates log containers. Call this function repeatedly to iterate over all log containers.

Syntax

CLFSUSER_API BOOL ScanLogContainers(
  [in, out]           PCLFS_SCAN_CONTEXT pcxScan,
  [in]                CLFS_SCAN_MODE     eScanMode,
  [in, out, optional] LPVOID             pReserved
);

Parameters

[in, out] pcxScan

A pointer to a client-allocated CLFS_SCAN_CONTEXT structure that the CreateLogContainerScanContext function initializes.

[in] eScanMode

The mode for containers to be scanned.

Containers can be scanned in any of the following CLFS_SCAN_MODE modes.

Value Meaning
CLFS_SCAN_INIT
Reinitializes the scan context, but does not allocate associated storage.

The initialization is destructive, because all data that is stored in the current scan context is lost.

CLFS_SCAN_CLOSE
Uninitializes the scan context, and deallocates system storage that is associated with a scan context.
CLFS_SCAN_FORWARD
Causes the next call to ScanLogContainers to proceed in a forward direction.

Cannot be used if CLFS_SCAN_BACKWARD is specified.

CLFS_SCAN_BACKWARD
Causes the next call to ScanLogContainers to proceed in a backward direction.

Cannot be used if CLFS_SCAN_FORWARD is specified.

[in, out, optional] pReserved

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:

Remarks

The ID of a log container is returned in: pcxScan->pinfoContainer->LogicalContainerId.

Note  The Common Log File System (CLFS) scan contexts are not thread-safe. They should not be used by more than one thread at a time, or passed into more than one asynchronous scan at a time.
 

Examples

For an example that uses this function, see Enumerating Log Containers.

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

CLFS_SCAN_CONTEXT

CLFS_SCAN_MODE

Common Log File System Functions

CreateLogContainerScanContext

GetLogContainerName

OVERLAPPED