PdhGetLogFileSize function

Returns the size of the specified log file.

Syntax


PDH_STATUS PdhGetLogFileSize(
  _In_  PDH_HLOG hLog,
  _Out_ LONGLONG *llSize
);

Parameters

hLog [in]

Handle to the log file. The PdhOpenLog or PdhBindInputDataSource function returns this handle.

llSize [out]

Size of the log file, in bytes.

Return value

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, the return value is a system error code or a PDH error code. The following are possible values.

Return codeDescription
PDH_LOG_FILE_OPEN_ERROR

An error occurred when trying to open the log file.

PDH_INVALID_HANDLE

The handle is not valid.

 

Remarks

If the log file handle points to multiple bound log files, the size is the sum of all the log files. If the log file is a SQL log file, the llSize parameter is the number of records in the log file.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Pdh.h

Library

Pdh.lib

DLL

Pdh.dll

See also

PdhOpenLog

 

 

Show: