GetLogFileInformation function

Returns a buffer that contains metadata about a specified log and its current state, which is defined by the CLFS_INFORMATION structure.

Data that is obtained reflects the state of the log only at the time when the call is made. Typically, a client can continue to cache and use fields from this structure until the next time that it appends records or writes its restart area. At that time, some of the information becomes stale.

Syntax


BOOL WINAPI GetLogFileInformation(
  _In_     HANDLE hLog,
  _Inout_  PCLFS_INFORMATION pinfoBuffer,
  _Inout_  PULONG cbBuffer
);

Parameters

hLog [in]

A handle to an open log that is obtained from a successful call to CreateLogFile.

The log handle can refer to a dedicated or multiplexed log.

pinfoBuffer [in, out]

A pointer to a user-allocated CLFS_INFORMATION structure that receives the log metadata.

cbBuffer [in, out]

A pointer to a variable that on input specifies the size, in bytes, of the metadata buffer pointed to by pinfoBuffer.

On output, it specifies the number of bytes that are actually copied into pinfoBuffer.

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

Examples

For an example that uses this function, see Creating a Log File.

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_INFORMATION
Common Log File System Functions
CreateLogFile
Obtaining the Next LSN

 

 

Community Additions

ADD
Show:
© 2014 Microsoft