PdhGetLogFileSize function (pdh.h)
Returns the size of the specified log file.
Syntax
PDH_FUNCTION PdhGetLogFileSize(
[in] PDH_HLOG hLog,
[out] LONGLONG *llSize
);
Parameters
[in] hLog
Handle to the log file. The PdhOpenLog or PdhBindInputDataSource function returns this handle.
[out] llSize
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 code | Description |
---|---|
|
An error occurred when trying to open the log file. |
|
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
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | pdh.h |
Library | Pdh.lib |
DLL | Pdh.dll |