Platform SDK: Performance Monitoring

PdhCloseLog

The PdhCloseLog function closes the specified log file.

PDH_STATUS PdhCloseLog(
  HLOG hLog,             
  DWORD dwFlags         
);

Parameters

hLog
[in] A handle to the log file to be closed.
dwFlags
[in] This parameter can be the following value.
Value Meaning
PDH_FLAGS_CLOSE_QUERY Closes the query associated with the specified log file handle.

Return Values

If the function succeeds, it returns ERROR_SUCCESS and closes and deletes the query.

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

Error value Description
PDH_INVALID_HANDLE An invalid log file handle was specified.

Requirements

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

See Also

PdhOpenQuery, PdhUpdateLog, PdhUpdateLogFileCatalog, PdhGetLogFileSize