Search code examples
windowsqtloggingqt5qfilesystemwatcher

WinEvent Logs and QFileSystemWatcher


I try to add WinEvent Logs Windows7 to QFileSystemWatcher.However, addPath() method return false value.

qDebug() << m_watcher->addPath("C:/Windows/System32/winevt/Logs/Application.evtx"); // false

The same i get after trying to add winevt folder:

qDebug() << m_watcher->addPath("C:/Windows/System32/winevt"); // false

Winevt folder has read-only attributes, and i can't modify it (after change,applying, closings and reopen attributes have old stay). I read in QFileSystemWatcher documentation:

Reasons for a watch failure are generally system-dependent, but may include the resource not existing, access failures, or the total watch count limit, if the platform has one.

But i have no idea how to find to source of failure and how it maybe fixed. Thanks in advance.


Solution

  • Find solution at another forum, where user give a link.

    Sysnative folder is able to access.

    Thanks all.