[Win32utils-devel] Need a little help with the pure Rubywin32-eventlog

Berger, Daniel Daniel.Berger at qwest.com
Wed May 17 14:06:45 EDT 2006

> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org 
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of 
> Heesob Park
> Sent: Tuesday, May 16, 2006 9:51 PM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] Need a little help with the 
> pure Rubywin32-eventlog
> Hi,
> 2006/5/17, Daniel Berger <djberg96 at gmail.com>:
> > Hi all,
> >
> > I'm working on the EventLog#read method for the pure Ruby 
> version of 
> > win32-eventlog, but I'm stuck on the get_description private method.
> >
> > Here are the problems:
> >
> > * I don't think I'm advancing the EVENTLOGRECORD properly between 
> > iterations.  Take a look at the end of the "while dwread > 
> 0" loop.  I 
> > get some records, but not all of them.
> >
> > * I'm not sure how to properly populate or pack/unpack the va_list, 
> > which is later passed to the FormatMessage() function.
> >
> > Please take a look.
> >
> > Thanks,
> >
> > Dan
> Here is the patch:


Thanks.  That mostly seems to work.  However, I'm hitting a segfault
after a few records.  As far as I can tell this happens when +buf+ is
empty, but I'm not positive that's the culprit.

I also noticed that FormatMessage's parameter list is defined as
'LPLLPLP' in error.rb (from windows-pr).  Thinking that might be the
culprit I tried changing the second param to 'L', but that didn't seem
to have any effect.

Any ideas?


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.

More information about the win32utils-devel mailing list