winevt
winevt copied to clipboard
Timeout of EvtNext is set way too low
This is a very useful library for me, but I've noticed some issues in my use case where EventLog.Query()
almost immediately returns with a ERROR_TIMEOUT message. Turns out that the timeout
argument of EvtNext is actually milliseconds, not seconds, so any operation taking longer than 60ms will fail. Changing it to 60000 fixed the issues for me, you should probably do the same. 😉
Oops! Never ran into that timeout. Will bump it up. Thanks!
+1 for me. I had to change it to 1000ms to get it working on some computers.
just adding my 2 cents. the timeout is still too low... thanks to ata4, I updated the value from 60 to 600 and everything works much better.
I created a fork with a fix for the timeout. You might want to try https://github.com/schorschii/winevt_ng.