ScanLogContainers function

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 LPVOID             pReserved
);

Parameters

pcxScan

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

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.

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

   
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