ScanLogContainers function

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

Syntax


BOOL WINAPI ScanLogContainers(
  _Inout_     PCLFS_SCAN_CONTEXT pcxScan,
  _In_        CLFS_SCAN_MODE     eScanMode,
  _Inout_opt_ LPVOID             pReserved
);

Parameters

pcxScan [in, out]

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

eScanMode [in]

The mode for containers to be scanned.

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

ValueMeaning
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 [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_INVALID_HANDLE
ERROR_INVALID_PARAMETER
ERROR_IO_PENDING
ERROR_NO_MORE_ITEMS

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]

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

 

 

Community Additions

ADD
Show: