Platform SDK: Performance Monitoring

PdhGetLogFileSize

The PdhGetLogFileSize function returns the size, in bytes, of the specified log file.

PDH_STATUS PdhGetLogFileSize(
  HLOG hLog,            
  LONGLONG *llSize     
);

Parameters

hLog
[in] A handle to the log file. This handle is returned by the PdhOpenLog function.
llSize
[out] A pointer to a variable that receives the length of the log file.

Return Values

If the function succeeds, it returns ERROR_SUCCESS.

If the function fails, the return value is a PDH error status defined in PDHMsg.h. The following are possible error values.

Error value Description
PDH_LOG_FILE_OPEN_ERROR An error occurred during the attempt to open the log file.
PDH_INVALID_HANDLE An invalid log file handle was specified.
PDH_INVALID_ARGUMENT An argument is not correct or is incorrectly formatted.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Pdh.h.
  Library: Use Pdh.lib.

See Also

PdhOpenLog