Platform SDK: Performance Monitoring |
The PdhUpdateLog function updates the current query and writes new data to the log file.
PDH_STATUS PdhUpdateLog( HLOG hLog, LPCTSTR szUserString );
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_INVALID_HANDLE | An invalid log file handle was specified. |
PDH_INVALID_ARGUMENT | A null string was passed in the szUserString parameter. |
There must be a currently opened query, and the desired counters must be added to it before this function is called. The query handle (hQuery) from PdhOpenQuery is passed to the call to PdhOpenLog before PdhUpdateLog is called.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Pdh.h.
Library: Use Pdh.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.
PdhUpdateLogFileCatalog, PdhGetLogFileSize, PdhOpenQuery, PdhOpenLog