Tue Sep 21 10:04:50 2010: Request 61484 was acted upon. Transaction: Correspondence added by p...@sennovation.com Queue: Win32-EventLog Subject: Re: [rt.cpan.org #61484] missing results with Win32::EventLog Broken in: (no value) Severity: (no value) Owner: Nobody Requestors: p...@sennovation.com Status: open Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=61484 >
Thanks! I was working off the example in the O'Reilly perl sysadm book http://oreilly.com/catalog/perlsysadm/chapter/ch09.html Good catching the bug. Worth noting in the module documentation, since others may miss it. Thanks for your help. I will use your approach of manually counting backwards through the entries. Paul 2010/9/21 Olivier 'dolmen' Mengué via RT <bug-win32-event...@rt.cpan.org>: > <URL: https://rt.cpan.org/Ticket/Display.html?id=61484 > > > My solution above was a workaround. > > However there is a real bug in the Win32::EventLog code. > The lpEvtLog->CurEntryNum member is incorrectly incremented in > ReadEventLog. It should be incremented by just 1 instead of LogBuf->Length. > > See > http://code.google.com/p/libwin32/source/browse/trunk/Win32-EventLog/EventLog.xs#351 > > -- > Olivier Mengué - http://search.cpan.org/~dolmen/ http://github.com/dolmen/ >