winevt icon indicating copy to clipboard operation
winevt copied to clipboard

Timeout of EvtNext is set way too low

Open ata4 opened this issue 6 years ago • 4 comments

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. 😉

ata4 avatar Jan 03 '18 17:01 ata4

Oops! Never ran into that timeout. Will bump it up. Thanks!

bannsec avatar Jan 04 '18 02:01 bannsec

+1 for me. I had to change it to 1000ms to get it working on some computers.

llimz avatar Mar 27 '18 07:03 llimz

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.

panofish avatar Nov 08 '21 02:11 panofish